Minty Command and Query based on DDD
Project description
This “Command and Query” module allows a developer to generate an abstraction around calling commands and queries in a domain model.
Getting started
# In your calling module from minty_ddd.ddd import ( CommandAndQuery, DDDConfiguration ) # Configuration: Set a domain prefix, and add "tests.domain.brewing.service" dddc = DDDConfiguration() dddc.domainprefix = "tests.domain" dddc.add_domain(domain="brewing") # Execute a command on the "brewing" domain cqs = CommandAndQuery() command = cqs.command(domain="brewing", command="BrewBeer") # Optionally, create a service factory, which gets propagated through # the command and query objects cqs = CommandAndQuery(service_factory=CustomObject()) if command.execute(alcohol_percentage=4): print("Executed succesfully") query = cqs.query(domain="brewing", query="ListBeers") list_of_beers = query.execute() # Params can also be pre-set by the command or query function: query = cqs.query(domain="brewing", query="ListBeers", params={"page": 1})
More documentation
Please see the generated documentation via CI for more information about this module and how to contribute in our online documentation. Open index.html when you get there: Sphinx Docs
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository
License
Copyright (c) 2018, Minty Team and all persons listed in CONTRIBUTORS
This project is licensed under the EUPL, v1.2. See the EUPL-1.2.txt file for details.
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
Hashes for minty_ddd-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cd87e964356fce918ef5760be33a7129380b214b93e95075253b18ec8059ec5 |
|
MD5 | 26c26b175d115c0f9e6e9e4342c7c1e5 |
|
BLAKE2b-256 | c97ee182214a6b4ef8c49a44de4d10646eaaf50139ebc9c2c878344be4722db5 |