Modules¶
This library contains several modules that can help with event sourcing in Python.
persistence
— Persistencedomain
— 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 Dog 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
— Applications- Domain-driven design
- Application objects
- Simple example
- Repository
- Notification log
- Registering custom transcodings
- Saving multiple aggregates
- Event-sourced log
- Application configuration
- Configuring aggregate caching
- Configuring persistence
- Configuring compression
- Configuring encryption
- Snapshotting
- Classes
system
— Event-driven systemsinterface
— Interface