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.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file aett_mongodb-2.0.2.tar.gz.

File metadata

  • Download URL: aett_mongodb-2.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for aett_mongodb-2.0.2.tar.gz
Algorithm Hash digest
SHA256 9929ecdb059042e315b6c14ed56cc3fac84ec23820200ccb8030e1a888fc989e
MD5 363cf5ecb7fcf31ba8128a13ceee3fd8
BLAKE2b-256 2a20ec75d58a9c7d827d867f6dd353c80741e632c6213b2ebf26592b14d3abf3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for aett_mongodb-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 842b09ce9fe9ef602c3d3cdf32161bcc800043b1abdf18d4e539b430ca9ea716
MD5 0e0a931590e114d1ac56d64d3623b4b5
BLAKE2b-256 669ce9d2d32cc1f70dfa395845f33e46b6a356a2d69619ee9ee959f2ee47887d

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