Postgres connector for aett event store
Project description
Æt (Aett) is an Event Store for Python
Aett Postgres provides the ability to store and retrieve events from a Postgres.
Usage
To create an event stream to manage events, you can use the PersistenceManagement
class.
import psycopg
from aett.postgres.EventStore import PersistenceManagement
# Set up a new event store
mgmt = PersistenceManagement(psycopg.connect("host=localhost port=5432 dbname=aett user=aett password=aett"))
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 Postgres database connection and specifying the configured table name.
from aett.postgres.EventStore import CommitStore, SnapshotStore
import pymongo.database
snapshot_store = SnapshotStore(psycopg.connect("host=localhost port=5432 dbname=aett user=aett password=aett"))
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_postgres-1.1.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for aett_postgres-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03376c3637620364cd6044212a9b4441b1cf28af726b05abaf13ab4b284db325 |
|
MD5 | 2e6061c296c43330beb9c2d0fe742a5c |
|
BLAKE2b-256 | f336a64ed7ee975ef89543265fcb0256de01b198975d5cbb59da96cdae193fd2 |