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.3.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file aett_mongodb-2.0.3.tar.gz
.
File metadata
- Download URL: aett_mongodb-2.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9975b9beb68023827bf152d51d932115efc64b5053bb583c1ef45f719a65594 |
|
MD5 | 7f714c4a8c1eb0e073a9dd89e2aacb02 |
|
BLAKE2b-256 | 57a748ab7591216b14383d25f4db875caa2c89649e386322a54c4dc0d2e14b8f |
File details
Details for the file aett_mongodb-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: aett_mongodb-2.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7839e0fee065284f45ea187fbb659907aa25f738ed20cd24ac9f000ca4df947 |
|
MD5 | 0f74e938a4e2a878d3f12d5bc9b11097 |
|
BLAKE2b-256 | 245f16be530a4219bbcb60f628c5efa19f86ce91b96d0116e13f5c7bd9bf9c2b |