ExamplesΒΆ

These examples show how to write an event sourced application, with and without classes in this library.

In the first section, a stand-alone event sourced domain model is developed which has no dependencies on the library, along with an application object that has minimal dependencies on library infrastructure classes for storing events. In later sections, more use is made of library classes, in order to demonstrate the other capabilities of the library.

All the examples in this guide follow the layered architecture: application, domain, infrastructure. To create working programs, simply copy all the code snippets from a section into a Python file.

Please feel free to experiment by making variations. The code snippets in this guide are covered by a test case, so please expect everything to work as presented - raise an issue if something goes wrong.