# pyeventsourcing/eventsourcing

A library for event sourcing in Python.

Repository: https://github.com/pyeventsourcing/eventsourcing
Canonical: https://ross.abutalabs.com/products/eventsourcing
Homepage: https://eventsourcing.readthedocs.io/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: domain-driven-design, ddd, eventsourcing, cqrs, event-sourcing, distributed-systems, django, sqlalchemy, python, python3
Last push: 2026-08-23T11:41:46+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 4026, "days_push": 10, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1684, forks 141 (observed 2026-08-28T04:05:21.931067+00:00)

## What it is
A Python library for implementing the event sourcing pattern, storing all application state changes as a sequence of immutable events. It provides aggregate and application base classes with pluggable persistence backends such as SQLAlchemy and Django.

## Use cases
- build event-sourced applications in Python
- store domain state as a sequence of events
- implement CQRS and domain-driven design patterns
- create an audit log of all state changes
- persist aggregates to a database with SQLAlchemy or Django
- reconstruct application state by replaying events

## When to choose
- you need full event sourcing with aggregates in Python
- you want an audit trail or temporal history of state changes
- you are following DDD/CQRS architecture
- you need pluggable persistence backends like SQLAlchemy or Django ORM

## When to avoid
- you just need simple CRUD persistence without event history
- your team is unfamiliar with event sourcing concepts
- you need a distributed event streaming platform like Kafka rather than an embedded event store

## Facets
- artifact type: library
- maturity: active
- function: serialization, database, developer-tools
- domain: backend, databases, developer-tools, microservices
- platform: python, cross-platform
- tags: event-sourcing, cqrs, domain-driven-design, ddd, event-store, aggregates, django, sqlalchemy

## Member repositories
- pyeventsourcing/eventsourcing (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.931067+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:17.206949+00:00, confidence not recorded.
  - readme: https://github.com/pyeventsourcing/eventsourcing (fetched 2026-08-28T04:05:21.931067+00:00, sha e5ac55f2883d)
  - registry_pypi: https://pypi.org/pypi/eventsourcing/json (fetched 2026-08-29T11:14:31.506689+00:00, sha c23934da460c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
