MongoDB connector for aett event store
Project description
Æt (Aett) is an Event Store for Python
Aett Mongo provides the ability to store and retrieve events from a MongoDB collection.
Usage
To create an event stream to manage events, you can use the PersistenceManagement
class.
import pymongo.database
from aett.mongodb.EventStore import PersistenceManagement
# Set up a new event store
mgmt = PersistenceManagement(pymongo.database.Database(pymongo.MongoClient('mongodb://localhost:27017/'), 'test'))
mgmt.initialize()
# Drop the store
mgmt.drop()
The package also provides CommitStore
and SnapshotStore
classes that can be used to store and retrieve events. They
can be instantiated by providing a MongoDB database connection and specifying the configured table name.
from aett.mongodb.EventStore import CommitStore, SnapshotStore
import pymongo.database
snapshot_store = SnapshotStore(pymongo.database.Database(pymongo.MongoClient('mongodb://localhost:27017/'), 'test'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aett_mongodb-2.0.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for aett_mongodb-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b626c7595df86093d66c55ebbca646201cf3f4c788095a902309c2232ee3172 |
|
MD5 | e9103b07f695d7469032d592861cf11e |
|
BLAKE2b-256 | fadaa85e38292c299851bbbd83e06fd741927a840a5f3da9d1b350f5959662bc |