cowbird.database.stores
Stores to read/write data to from/to MongoDB using pymongo.
Module Contents
Classes
Check that the store implementation defines its type and index_fields. |
|
Base class extended by all concrete store implementations. |
|
Registry for monitoring instances. |
Attributes
-
class
cowbird.database.stores.
StoreInterface
[source] Bases:
object
Check that the store implementation defines its type and index_fields.
-
class
cowbird.database.stores.
MongodbStore
(collection: Optional[Dict[str, Any]])[source] Base class extended by all concrete store implementations.
Validate and hold the collection for all the implementation.
-
classmethod
get_args_kwargs
(cls: Any, *args: Any, **kwargs) → Tuple[Tuple, Dict][source] Filters
MongodbStore
-specific arguments to safely pass them down its__init__
.
-
classmethod
-
class
cowbird.database.stores.
MonitoringStore
(*args, **kwargs)[source] Bases:
StoreInterface
,MongodbStore
Registry for monitoring instances.
Uses MongoDB to store what is monitored and by whom.
Init the store used to save monitors.
-
save_monitor
(self: cowbird.monitoring.monitor.Monitor, monitor) → None[source] Stores Monitor in MongoDB storage.
-
delete_monitor
(self: cowbird.monitoring.monitor.Monitor, monitor) → None[source] Removes Monitor from MongoDB storage.
-
list_monitors
(self) → List[cowbird.monitoring.monitor.Monitor][source] Lists all Monitor in MongoDB storage.
-