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-0.7.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for aett_mongodb-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5ff5848162e4406d5726c39f5827f059ae17f995c77e6868d78b05d4d2011c3 |
|
MD5 | ce04fdc1b16e5bb1f6ee921d38a50a72 |
|
BLAKE2b-256 | 1fcd66e2574da12b5067a6ce240939b0408bfab0c67b4867cb2c230d257114e8 |