cowbird.database.mongodb
Attributes
Classes
Return the unique identifier of db type matching settings. |
Functions
|
Obtains the basic database connection from settings. |
|
Obtains the database with configuration ready for usage. |
Module Contents
- class cowbird.database.mongodb.MongoDatabase(container: cowbird.typedefs.AnySettingsContainer)[source]
Bases:
cowbird.database.base.DatabaseInterface
Return the unique identifier of db type matching settings.
Initialize the mongo database from various type of container.
- get_store(store_type: str | Type[cowbird.database.stores.StoreInterface] | AnyMongodbStoreType, *store_args: Any, **store_kwargs: Any) AnyMongodbStore [source]
Retrieve a store from the database.
- Parameters:
store_type – type of the store to retrieve/create.
store_args – additional arguments to pass down to the store.
store_kwargs – additional keyword arguments to pass down to the store.