weaver.database.mongodb

Module Contents

weaver.database.mongodb.MongoDB :Optional[Database][source]
weaver.database.mongodb.MongodbStores[source]
weaver.database.mongodb.AnyStoreType[source]
class weaver.database.mongodb.MongoDatabase(: AnySettingsContainer, container)[source]

Return the unique identifier of db type matching settings.

Initialize self. See help(type(self)) for accurate signature.

_database[source]
_settings[source]
_stores[source]
type = mongodb[source]
is_ready(self)[source]
get_store(self: Union[AnyStr, StoreInterface, MongodbStores], store_type: Any, *store_args: Any, **store_kwargs)[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.

get_session(self)[source]
get_information(self)[source]
Returns

{‘version’: version, ‘type’: db_type}

run_migration(self)[source]
weaver.database.mongodb.get_mongodb_connection(container: AnySettingsContainer) → Database[source]

Obtains the basic database connection from settings.

weaver.database.mongodb.get_mongodb_engine(container: AnySettingsContainer) → Database[source]

Obtains the database with configuration ready for usage.