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.0.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for aett_postgres-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b946cb4b3d38fd3d1c6fcb1ef3dce50cb9855f9bb8a86d02d3985aa5a468506a |
|
MD5 | c8b7610ea7cb7e9cb5af0986d9e27e1b |
|
BLAKE2b-256 | b71f7599c59c270dcdab477dc13b81e913e7d62304e25948be09afc5ec12a77a |