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.1.0.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file aett_mongodb-2.1.0.tar.gz
.
File metadata
- Download URL: aett_mongodb-2.1.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | baa324a2dbb8b32450be51d68125fe9f1ee30153c00fdeee5e468c4fb6963e67 |
|
MD5 | e82cd2a8885c4009d677ab74256a8aa3 |
|
BLAKE2b-256 | b1a99a75bef2fe4da230005c25b5f6a8551d719df2fb5872e000b04b8c41eeea |
File details
Details for the file aett_mongodb-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: aett_mongodb-2.1.0-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.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff71f65d335cbae760f7aede6eda67a3197d35c03a7bf383140969a87bf97e9 |
|
MD5 | f217a227faba968361b074c8b7a8439a |
|
BLAKE2b-256 | 5fd841cbc8f30b5833485b95676d1610b31f60dc027c5e8c36fdfdadf3c0b50c |