cowbird.database.base

Attributes

JSON

AnySettingsContainer

StoreSelector

Classes

StoreInterface

Check that the store implementation defines its type and index_fields.

DatabaseInterface

Return the unique identifier of db type matching settings.

Module Contents

class cowbird.database.base.StoreInterface[source]

Bases: object

Check that the store implementation defines its type and index_fields.

type: str = None
index_fields: List[str] = []
cowbird.database.base.JSON[source]
cowbird.database.base.AnySettingsContainer[source]
cowbird.database.base.StoreSelector[source]
class cowbird.database.base.DatabaseInterface(_: cowbird.typedefs.AnySettingsContainer)[source]

Return the unique identifier of db type matching settings.

Database interface defining a minimum set of function mostly around store management.

__slots__ = ['type'][source]
static _get_store_type(store_type: cowbird.typedefs.StoreSelector) str[source]
abstract get_store(store_type: cowbird.typedefs.StoreSelector, *store_args: Any, **store_kwargs: Any) cowbird.database.stores.StoreInterface[source]
abstract reset_store(store_type: cowbird.typedefs.StoreSelector) cowbird.database.stores.StoreInterface[source]
abstract get_session() Any[source]
abstract get_information() cowbird.typedefs.JSON[source]
Returns:

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

abstract is_ready() bool[source]