Aggregates composition for domain driven design in Python
Project description
Pycider
Documentation is here. This code is a Python implementation of deciders based on the F# code from Jérémie Chassaing located here dddeu-2023-deciders. There was additionally a talk on this, to be found here.
Installation
You can use pip install pycider or poetry add pycider to install this project from PyPI.
Usage
You can create Process or a Decider. A simple example of this can be found under the test composition page.
Decider
Decider is a simple state machine that seperates state changes and actions. Commands are actions which when executed return Events representing the results from the actions. You can use Event's to deterministically update the State allowing replayability and easy serialization by only saving Event's.
Commands are turned intoEvent's throughdecide()calls.Event's deterministically update theStatethroughevolve()calls.
Process
Process is a simple state machine for managing a system. A system has several needs. The system given a State should be able to resume to the next Command, The system should be able to react to Event changes and return Command's for dealing with those changes. Finally the system should be able to update the State deterministically given a Event.
Event's are turned intoCommands thrughreact()calls.- Given a
State, the system should be able toresume()to the appropriateCommand. Event's deterministically update theStatethroughevolve()calls.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycider-3.0.1.tar.gz.
File metadata
- Download URL: pycider-3.0.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
230c43239dab4f110c57d03438860ea8da70d3af4c68d9fe7f50512a4c179f0d
|
|
| MD5 |
28e4a1823487d87aae0ef3761569762e
|
|
| BLAKE2b-256 |
5f11c52514f6756afea1cf3f7e8e29726b80f31d598164552e2ccc95ced9ba52
|
File details
Details for the file pycider-3.0.1-py3-none-any.whl.
File metadata
- Download URL: pycider-3.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b2908a76f0097666b0763b5a0772f53e021a196fbb473abd6a896a4be6da109
|
|
| MD5 |
33d1421a531ddf975491b15322aee669
|
|
| BLAKE2b-256 |
063d91d4495d77fe804c4d9955c220a5fd64fb68e9e35ec8566bb33cb3276699
|