Modules¶
This library contains several modules that implement event sourcing in Python.
domain
— Domain models- Aggregates in DDD
- Event-sourced aggregates
- Declarative syntax
- Create new aggregate by calling the aggregate class directly
- Using the init method to define the created event class
- Dataclass-style init methods
- Declaring the created event class name
- Defining the aggregate ID
- The
@event
decorator - Inferring the event class name from the method name
- Using an explicitly defined event class
- The World aggregate class revisited
- The Page and Index aggregates revisited
- Non-trivial command methods
- Raising exceptions in the body of decorated methods
- The
@aggregate
decorator
- Timestamp timezones
- Initial version number
- Topic strings
- Versioning
- Snapshots
- Notes
- Classes
application
— Applicationspersistence
— Infrastructuresystem
— Event-driven systemsinterface
— Interface