A functional composition framework that supports:
- State - functions which retain state for their next turn of action.
- Ambiguity - non deterministic composition with priorities.
- Injection of compositions into long pipelines (deep dependency injection).
- Non cancerous
asynciosupport.
pip install computation-graph
To deploy: python setup.py sdist bdist_wheel; twine upload dist/*; rm -rf dist/;
Debugging
We need graphviz to visualize computation graphs:
sudo apt update && apt install graphviz
pip install pygraphviz
Debugging is possible by replacing to_callable with run.to_callable_with_side_effect with ascii.computation_trace as the first argument.
This will save a file on each graph execution to current working directory.
You can use this file in a graph viewer like gephi. Nodes colored red are part of the 'winning' computation path. Each of these nodes has the attributes 'result' and 'state'. 'result' is the output of the node, and 'state' is the new state of the node.
In gephi you can filter for the nodes participating in calculation of final result by filtering on result != null.
Metadata
Release files for computation-graph 14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| computation-graph-14.tar.gz | 15.8 kB | Without provenance | Details for computation-graph-14.tar.gz |
Release files / computation-graph-14.tar.gz
| Download URL | computation-graph-14.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55f95d82d8c7f8fcb668fb3f677e4f28cc32f10f1e19a3232fc0896fc3f54358
|
|
BLAKE2b-256 checksum How to use checksums |
54de038cdc84ed359207a9a12b67415134af4d025346f3571ce24a5f9547687a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.1
|
Security for computation-graph 14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.