AnonymousSpottedToad/securityPatternsRecovery / codebase /repos /python /Clinical-Genomics_statina /statina /adapter /plugin.py
| import logging | |
| from mongo_adapter import MongoAdapter | |
| from pymongo.collection import Collection | |
| from pymongo.database import Database | |
| LOG = logging.getLogger(__name__) | |
| class StatinaAdapter(MongoAdapter): | |
| def setup(self, db_name: str): | |
| """Setup connection to a database""" | |
| if self.client is None: | |
| raise SyntaxError("No client is available") | |
| self.db: Database = self.client[db_name] | |
| self.db_name: str = db_name | |
| self.sample_collection: Collection = self.db.sample | |
| self.batch_collection: Collection = self.db.batch | |
| self.user_collection: Collection = self.db.user | |
| self.dataset_collection: Collection = self.db.dataset | |
| LOG.info("Use database %s.", db_name) | |
Xet Storage Details
- Size:
- 745 Bytes
- Xet hash:
- 193582d3b536dee140d634fd86b2e73ebd4609b1e9da0ff1f03443147382d229
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.