This document describes the packages, modules, classes, functions and other code details of the library.
The eventsourcing package contains packages for the application layer, the domain layer, the infrastructure layer, and the interface layer. There is also a module for exceptions, an example package, and a utils package.
The application layer brings together the domain and infrastructure layers.
.. automodule:: eventsourcing.application.base :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.application.policies :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.application.simple :members: :show-inheritance: :undoc-members:
The domain layer contains a domain model, and optionally services that work across different entities or aggregates.
The domain model package contains classes and functions that can help develop an event sourced domain model.
.. automodule:: eventsourcing.domain.model.aggregate :members: :show-inheritance: :undoc-members:
A kind of collection, indexed by integer. Doesn't need to replay all events to exist.
.. automodule:: eventsourcing.domain.model.array :members: :show-inheritance: :undoc-members:
Decorators useful in domain models based on the classes in this library.
.. automodule:: eventsourcing.domain.model.decorators :members: :show-inheritance: :undoc-members:
Base classes for domain entities of different kinds.
.. automodule:: eventsourcing.domain.model.entity :members: :show-inheritance: :undoc-members:
Base classes for domain events of different kinds.
.. automodule:: eventsourcing.domain.model.events :members: :show-inheritance: :undoc-members:
Snapshotting is implemented in the domain layer as an event.
.. automodule:: eventsourcing.domain.model.snapshot :members: :show-inheritance: :undoc-members:
Time-bucketed logs allow a sequence of the items that is sequenced by timestamp to be split across a number of different database partitions, which avoids one partition becoming very large (and then unworkable).
.. automodule:: eventsourcing.domain.model.timebucketedlog :members: :show-inheritance: :undoc-members:
The infrastructure layer adapts external devices in ways that are useful for the application, such as the way an event store encapsulates a database.
Abstract base classes for the infrastructure layer.
.. automodule:: eventsourcing.infrastructure.base :members: :show-inheritance: :undoc-members:
Classes for event sourcing with Apache Cassandra.
.. automodule:: eventsourcing.infrastructure.cassandra.datastore :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.cassandra.factory :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.cassandra.manager :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.cassandra.models :members: :show-inheritance: :undoc-members:
Base classes for concrete datastore classes.
.. automodule:: eventsourcing.infrastructure.datastore :members: :show-inheritance: :undoc-members:
A Django application for event sourcing with the Django ORM.
.. automodule:: eventsourcing.infrastructure.django.models :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.django.manager :members: :show-inheritance: :undoc-members:
Base classes for event players of different kinds.
.. automodule:: eventsourcing.infrastructure.eventplayer :members: :show-inheritance: :undoc-members:
Base classes for event sourced repositories (not abstract, can be used directly).
.. automodule:: eventsourcing.infrastructure.eventsourcedrepository :members: :show-inheritance: :undoc-members:
The event store provides the application-level interface to the event sourcing persistence mechanism.
.. automodule:: eventsourcing.infrastructure.eventstore :members: :show-inheritance: :undoc-members:
Different ways of generating sequences of integers.
.. automodule:: eventsourcing.infrastructure.integersequencegenerators.base :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.integersequencegenerators.redisincr :members: :show-inheritance: :undoc-members:
Different ways of getting sequenced items from a datastore.
.. automodule:: eventsourcing.infrastructure.iterators :members: :show-inheritance: :undoc-members:
Repository base classes for entity classes defined in the library.
.. automodule:: eventsourcing.infrastructure.repositories.array :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.repositories.collection_repo :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.repositories.timebucketedlog_repo :members: :show-inheritance: :undoc-members:
The persistence model for storing events.
.. automodule:: eventsourcing.infrastructure.sequenceditem :members: :show-inheritance: :undoc-members:
The sequenced item mapper maps sequenced items to application-level objects.
.. automodule:: eventsourcing.infrastructure.sequenceditemmapper :members: :show-inheritance: :undoc-members:
Snapshotting avoids having to replay an entire sequence of events to obtain the current state of a projection.
.. automodule:: eventsourcing.infrastructure.snapshotting :members: :show-inheritance: :undoc-members:
Classes for event sourcing with SQLAlchemy.
.. automodule:: eventsourcing.infrastructure.sqlalchemy.datastore :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.sqlalchemy.factory :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.sqlalchemy.manager :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.infrastructure.sqlalchemy.records :members: :show-inheritance: :undoc-members:
Reader for timebucketed logs.
.. automodule:: eventsourcing.infrastructure.timebucketedlog_reader :members: :show-inheritance: :undoc-members:
The interface layer uses an application to service client requests.
Notification log is a pull-based mechanism for updating other applications.
.. automodule:: eventsourcing.interface.notificationlog :members: :show-inheritance: :undoc-members:
The utils package contains common functions that are used in more than one layer.
.. automodule:: eventsourcing.utils.cipher.aes :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.utils.times :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.utils.topic :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.utils.transcoding :members: :show-inheritance: :undoc-members:
A few exception classes are defined by the library to indicate particular kinds of error.
.. automodule:: eventsourcing.exceptions :members: :show-inheritance: :undoc-members:
A simple, unit-tested, event sourced application.
.. automodule:: eventsourcing.example.application :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.example.domainmodel :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.example.infrastructure :members: :show-inheritance: :undoc-members:
.. automodule:: eventsourcing.example.interface.flaskapp :members: :show-inheritance: :undoc-members: