# Pycider
[![Documentation Status](https://readthedocs.org/projects/pycider/badge/?version=latest)](https://pycider.readthedocs.io/en/latest/?badge=latest)![Test Status](https://github.com/melodyasper/pycider/actions/workflows/ci.yml/badge.svg)
[Documentation is here](http://pycider.readthedocs.io/). This code is a Python implementation of deciders based on the F# code from [Jérémie Chassaing](https://github.com/thinkbeforecoding/) located here [dddeu-2023-deciders](https://github.com/thinkbeforecoding/dddeu-2023-deciders). There was additionally a talk on this, to be found [here](https://www.youtube.com/watch?v=72TOhMpEVlA).
## Installation
You can use `pip install pycider` or `poetry add pycider` to install this project from [PyPI](https://pypi.org/project/pycider/).
## Usage
You can create `Process` or a `Decider`. A simple example of this can be found under the [test composition page](./tests/test_compositions.py).
## Decider
`Decider` is a simple state machine that seperates state changes and actions. `Command`s are actions which when executed return `Event`s 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.
* `Command`s 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 `Command`s 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/melodyasper/pycider",
"name": "pycider",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "ddd, domain, design, decider, deciders, aggregates, aggregate, composition",
"author": "Melody Asper",
"author_email": "melodieasper@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5f/11/c52514f6756afea1cf3f7e8e29726b80f31d598164552e2ccc95ced9ba52/pycider-3.0.1.tar.gz",
"platform": null,
"description": "# Pycider\n\n[![Documentation Status](https://readthedocs.org/projects/pycider/badge/?version=latest)](https://pycider.readthedocs.io/en/latest/?badge=latest)![Test Status](https://github.com/melodyasper/pycider/actions/workflows/ci.yml/badge.svg)\n\n\n[Documentation is here](http://pycider.readthedocs.io/). This code is a Python implementation of deciders based on the F# code from [J\u00e9r\u00e9mie Chassaing](https://github.com/thinkbeforecoding/) located here [dddeu-2023-deciders](https://github.com/thinkbeforecoding/dddeu-2023-deciders). There was additionally a talk on this, to be found [here](https://www.youtube.com/watch?v=72TOhMpEVlA).\n\n## Installation\n\nYou can use `pip install pycider` or `poetry add pycider` to install this project from [PyPI](https://pypi.org/project/pycider/).\n\n## Usage\n\nYou can create `Process` or a `Decider`. A simple example of this can be found under the [test composition page](./tests/test_compositions.py). \n\n## Decider \n\n`Decider` is a simple state machine that seperates state changes and actions. `Command`s are actions which when executed return `Event`s 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. \n\n* `Command`s are turned into `Event`'s through `decide()` calls.\n* `Event`'s deterministically update the `State` through `evolve()` calls.\n\n## Process\n\n`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`. \n\n* `Event`'s are turned into `Command`s thrugh `react()` calls.\n* Given a `State`, the system should be able to `resume()` to the appropriate `Command`.\n* `Event`'s deterministically update the `State` through `evolve()` calls.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Aggregates composition for domain driven design in Python",
"version": "3.0.1",
"project_urls": {
"Homepage": "https://github.com/melodyasper/pycider",
"Repository": "https://github.com/melodyasper/pycider"
},
"split_keywords": [
"ddd",
" domain",
" design",
" decider",
" deciders",
" aggregates",
" aggregate",
" composition"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "063d91d4495d77fe804c4d9955c220a5fd64fb68e9e35ec8566bb33cb3276699",
"md5": "33d1421a531ddf975491b15322aee669",
"sha256": "7b2908a76f0097666b0763b5a0772f53e021a196fbb473abd6a896a4be6da109"
},
"downloads": -1,
"filename": "pycider-3.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "33d1421a531ddf975491b15322aee669",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 10145,
"upload_time": "2024-12-09T18:45:05",
"upload_time_iso_8601": "2024-12-09T18:45:05.397268Z",
"url": "https://files.pythonhosted.org/packages/06/3d/91d4495d77fe804c4d9955c220a5fd64fb68e9e35ec8566bb33cb3276699/pycider-3.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5f11c52514f6756afea1cf3f7e8e29726b80f31d598164552e2ccc95ced9ba52",
"md5": "28e4a1823487d87aae0ef3761569762e",
"sha256": "230c43239dab4f110c57d03438860ea8da70d3af4c68d9fe7f50512a4c179f0d"
},
"downloads": -1,
"filename": "pycider-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "28e4a1823487d87aae0ef3761569762e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 9058,
"upload_time": "2024-12-09T18:45:07",
"upload_time_iso_8601": "2024-12-09T18:45:07.058344Z",
"url": "https://files.pythonhosted.org/packages/5f/11/c52514f6756afea1cf3f7e8e29726b80f31d598164552e2ccc95ced9ba52/pycider-3.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 18:45:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "melodyasper",
"github_project": "pycider",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pycider"
}