Skip to main content

MongoDB connector for aett event store

Project description

Æt (Aett) is an Event Store for Python

Downloads

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


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)

Uploaded Source

Built Distribution

aett_mongodb-2.0.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

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

Hashes for aett_mongodb-2.0.3.tar.gz
Algorithm Hash digest
SHA256 b9975b9beb68023827bf152d51d932115efc64b5053bb583c1ef45f719a65594
MD5 7f714c4a8c1eb0e073a9dd89e2aacb02
BLAKE2b-256 57a748ab7591216b14383d25f4db875caa2c89649e386322a54c4dc0d2e14b8f

See more details on using hashes here.

File details

Details for the file aett_mongodb-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for aett_mongodb-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7839e0fee065284f45ea187fbb659907aa25f738ed20cd24ac9f000ca4df947
MD5 0f74e938a4e2a878d3f12d5bc9b11097
BLAKE2b-256 245f16be530a4219bbcb60f628c5efa19f86ce91b96d0116e13f5c7bd9bf9c2b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page