Catalog PyPI
PACKAGE EXPLORERView in registry

aett

PyPI

Event store for Python

dynamodbeventeventsmongodbmssqlmysqlpostgresqls3sourcingsqlitestore
Versions collected1
Direct dependencies13From release 3.4.1
Last observed20 Oct, 20:57 UTC

README

Version 3.4.1 documentation

ᚨᛖᛏᛏ (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 EngineSyncAsync
Sqlite++
DynamoDB++
MongoDB++
PostgreSQL++
MySql++
MS SQL Server+-
S3++
In-Memory+-

Downloads

PackageDownloads
aettDownloads

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
3.4.125 Jun 202613

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
jjrdk/aett

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:13d09b7750c1d358ceb6bcc6c2f8364d4f14c84cf97f011a003f65b46a6cfd10