Skip to main content

Aggregates composition for domain driven design in Python

Project description

Pycider

Documentation StatusTest Status

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 into Event's through decide() calls.
  • Event's deterministically update the State through evolve() 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 into Commands thrugh react() calls.
  • Given a State, the system should be able to resume() to the appropriate Command.
  • Event's deterministically update the State through evolve() calls.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycider-2.0.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycider-2.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file pycider-2.0.0.tar.gz.

File metadata

  • Download URL: pycider-2.0.0.tar.gz
  • Upload date:
  • Size: 8.8 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

Hashes for pycider-2.0.0.tar.gz
Algorithm Hash digest
SHA256 c3071ecb36c1c37fce6551dc1acdad9f1c0e5d278458179e1c9868f0dc12f5bb
MD5 6bc8044c030c71ddc7588b87d55dbe80
BLAKE2b-256 9f44669f9bee017e82a1e03bcb8e77255544d061acac3f03af6484ebaa03ba38

See more details on using hashes here.

File details

Details for the file pycider-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: pycider-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 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

Hashes for pycider-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3138ae8ca8d39158731875f2e6cea7e952e4417b51443cde76a9dfeab132d3a
MD5 e0bb8ca7bcf06eadbf7de124e9035e30
BLAKE2b-256 48c92d9e83e1cab77f114c0ac6e6d3e1dc7b3a8ff27b6f89d840e8b1b4db89ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page