eventsourcing
Event sourcing in Python
Decision gist · record as of 2026-08-14
Yes. Eventsourcing is a mature, actively maintained library (stable since 2015, production-ready) with low install friction, no security vulnerabilities, and a permissive license. It's the right choice if you need event sourcing as a core pattern; if you're unsure whether event sourcing fits your problem, evaluate that architectural decision first before installing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; by default events are stored in memory using Python objects, but persistence modules can be configured via environment variables.
- Low friction: pure Python wheel with a single runtime dependency (typing_extensions).
- Actively maintained with a recent release 140 days ago and ongoing commits; repository shows 1681 stars and is not archived.
License · maintenance · safety
permissive license (permissive) — Permissive license allows commercial and private use without restriction; suitable for most projects without legal concern.
last release 2026-03-27 (140 days) · last repo commit 2026-07-27 · 1,681 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 91,476 downloads/mo, #13,515 on PyPI
Alternatives
Verify before relying
pip install eventsourcing
from eventsourcing.domain import Aggregate, event
from eventsourcing.application import Application
class Dog(Aggregate):
@event('Registered')
def __init__(self, name: str) -> None:
self.name = name
class DogSchool(Application):
def register_dog(self, name: str):
dog = Dog(name)
self.save(dog)
return dog.id
school = DogSchool()
dog_id = school.register_dog('Fido')- Performance characteristics under high-volume event streams or with large aggregates
- Scalability limits when using in-memory persistence versus external databases
- Compatibility of encryption/compression features with all supported database adapters
What it is and what it does
Eventsourcing provides a framework for building applications where every state change is recorded as an immutable event. Rather than storing current state directly, you define domain aggregates (like a Dog class) decorated with @event methods, then use an Application class to manage persistence and retrieval. The library handles event storage, replay, snapshotting, versioning, and optional encryption—supporting multiple backends (in-memory, SQLite, and external databases) configured through environment variables.
The core workflow is: define domain models with event decorators, create an application class that orchestrates saves and queries, then run your code against any configured persistence layer. Built-in features include optimistic concurrency control, compression, application-level encryption for PII compliance, and notification-based projections for CQRS patterns. It requires Python 3.10+ and depends only on typing_extensions.
Use it for
- Build audit-trail systems where every state change must be recorded and replayed for compliance or debugging
- Implement CQRS architectures with separate read and write models using notifications and projections
- Create domain-driven applications with strong consistency boundaries and event-based communication between aggregates
- Develop distributed systems where event logs serve as the source of truth for replication across nodes
- Encrypt sensitive domain events at the application level to meet GDPR or similar data protection requirements
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Eventsourcing is a mature, actively maintained library (stable since 2015, production-ready) with low install friction, no security vulnerabilities, and a permissive license. It's the right choice if you need event sourcing as a core pattern; if you're unsure whether event sourcing fits your problem, evaluate that architectural decision first before installing.
Install
eventsourcing on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (typing_extensions). Actively maintained with a recent release 140 days ago and ongoing commits; repository shows 1681 stars and is not archived.
Requires Python 3.10 or later; by default events are stored in memory using Python objects, but persistence modules can be configured via environment variables.
License in practice
Permissive license allows commercial and private use without restriction; suitable for most projects without legal concern.
Quickstart
pip install eventsourcing
from eventsourcing.domain import Aggregate, event
from eventsourcing.application import Application
class Dog(Aggregate):
@event('Registered')
def __init__(self, name: str) -> None:
self.name = name
class DogSchool(Application):
def register_dog(self, name: str):
dog = Dog(name)
self.save(dog)
return dog.id
school = DogSchool()
dog_id = school.register_dog('Fido')
Verify before relying
- Performance characteristics under high-volume event streams or with large aggregates
- Scalability limits when using in-memory persistence versus external databases
- Compatibility of encryption/compression features with all supported database adapters
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Actively maintained 140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 91,476 / month, #13,515 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules |
Evidence: eventsourcing-9.5.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “event sourcing library”
- eventsourcingEventsourcing is a Python library for implementing event sourcing, a…
- webexpythonsdkA Python library for interacting with Webex APIs, providing native…
- sphinx-argparseSphinx extension that automatically generates documentation for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also django-concurrency · autogen-core · taskflow · pyobjc-framework-CalendarStore · launchdarkly-eventsource · adagio · safe-init · eventkit · aeventkit · execnet