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

Metadata

Release files for aett 3.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aett 3.4.1
File Size Uploaded Provenance
aett-3.4.1.tar.gz 38.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aett 3.4.1
File Interpreter ABI Platform
aett-3.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 135.9 kB

Release files / aett-3.4.1.tar.gz

Download URL aett-3.4.1.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d0208cb1975f5e899ebd6dfbdc72b20f7f62e8ea983ad98adda3afd7cb028544
BLAKE2b-256 checksum
How to use checksums
0c45ca2393bcea011f51b0053860e59eda1c87e2805ac8b8abf65d19ea56806f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / aett-3.4.1-py3-none-any.whl

Download URL aett-3.4.1-py3-none-any.whl
Size 97.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a0f017d955ca69be1954a4401fcc368f787fa011d463bedc01634ca6d658c8e
BLAKE2b-256 checksum
How to use checksums
ea3f0b33a740d62e21c499ac1850a27d6c46fd24e720050f324d9532062f2384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for aett 3.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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