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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aett_mongodb_async-2.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file aett_mongodb_async-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aett_mongodb_async-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9081b537c848a642585ad406b653b9ac6e565c4c6b72eeb5409dfea61ac41155
MD5 aa3004f83bb26f84267e70e771ac8300
BLAKE2b-256 69bfac3a8e2efcc12a1c9a955bbf925489efa11fd37dfc16e6cc813f209759f4

See more details on using hashes here.

Supported by

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