Skip to main content

ᚨᛖᛏᛏ (Aett) is an Event Store for Python

Provides a framework for managing and storing event streams.

Usage

The CommitStore interface is used to store and retrieve events from the event store. The SnapshotStore interface is used to store and retrieve snapshots from the event store.

A CommitStore and SnapshotStore implementation exists for each type of storage class. Use the appropriate module for your chose storage.

Example:

from aett.eventstore.topic_map import TopicMap
from aett.domain.conflict_detector import ConflictDetector
from aett.domain.default_aggregate_repository import DefaultAggregateRepository
from aett.storage.synchronous.postgresql.commit_store import CommitStore
from aett.storage.synchronous.postgresql.snapshot_store import SnapshotStore

commit_store = CommitStore(
    connection_string="Your connection string",
    topic_map=TopicMap(),
    conflict_detector=ConflictDetector(),
)
snapshot_store = SnapshotStore(
    connection_string="Your connection string"
)
aggregate_repository = DefaultAggregateRepository(
    "tenant_id",
    store=commit_store,
    snapshot_store=snapshot_store
)

aggregate: YourAggregateType = aggregate_repository.get(YourAggregateType, "stream_id")

The CommitStore takes in a way to connect to the database as well as:

  • a TopicMap to map events to their application types
  • and ConflictDetector to detect conflicts between competing commits

Domain Modeling

The Aggregate class is used to model domain aggregates. The Saga class is used to model domain sagas.

The loading and saving of aggregates is managed by the DefaultAggregateRepository and the DefaultSagaRepository classes respectively.

Both repositories use the CommitStore and SnapshotStore interfaces to store and retrieve events and snapshots from the persistence specific event stores.

See also:

  • Domain Modeling for more information on how to model your domain aggregates and sagas.
  • Domain Storage for more information on how to store and retrieve aggregates and sagas.

Currently supported persistence stores are:

Storage Engine Sync Async
Sqlite + +
DynamoDB + +
MongoDB + +
PostgreSQL + +
MySql + +
MS SQL Server + -
S3 + +
In-Memory + -

Downloads

Package Downloads
aett Downloads

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aett-3.4.1.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

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

aett-3.4.1-py3-none-any.whl (97.9 kB view details)

Uploaded Python 3

File details

Details for the file aett-3.4.1.tar.gz.

File metadata

  • Download URL: aett-3.4.1.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aett-3.4.1.tar.gz
Algorithm Hash digest
SHA256 d0208cb1975f5e899ebd6dfbdc72b20f7f62e8ea983ad98adda3afd7cb028544
MD5 64949181fe9e1a917741f2dc5f83786a
BLAKE2b-256 0c45ca2393bcea011f51b0053860e59eda1c87e2805ac8b8abf65d19ea56806f

See more details on using hashes here.

File details

Details for the file aett-3.4.1-py3-none-any.whl.

File metadata

  • Download URL: aett-3.4.1-py3-none-any.whl
  • Upload date:
  • Size: 97.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aett-3.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a0f017d955ca69be1954a4401fcc368f787fa011d463bedc01634ca6d658c8e
MD5 1bfd55c524e11e2e47287c020ab648e8
BLAKE2b-256 ea3f0b33a740d62e21c499ac1850a27d6c46fd24e720050f324d9532062f2384

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

3.4.1 This release

2 files

3.4.0

2 files

3.3.1

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page