Skip to main content

Postgres connector for aett event store

Project description

Æt (Aett) is an Event Store for Python

Downloads

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)

Uploaded Source

Built Distribution

aett_postgres-1.1.0-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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