A function composition framework that supports:
- State - functions which retain state for their next turn of action.
- Prioritized paths - lazily attempt overloaded composition paths according to priorities.
- Deep dependency injection - compose a function to a variadic function at the end of an arbitrarily long pipeline.
- Non cancerous
asynciosupport.
pip install computation-graph
To deploy: python setup.py sdist bdist_wheel; twine upload dist/*; rm -rf dist/;
Type checking
The runner will type check all outputs for nodes with return type annotations. In case of a wrong typing, it will log the node at fault.
Debugging
Computation trace
Available computation trace visualizers:
graphviz.computation_tracemermaid.computation_traceascii.computation_trace
To use, replace to_callable with run.to_callable_with_side_effect with your selected style as the first argument.
Graphviz debugger
This debugger 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 77
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-77.tar.gz | 33.2 kB | Without provenance | Details for computation_graph-77.tar.gz |
Release files / computation_graph-77.tar.gz
| Download URL | computation_graph-77.tar.gz |
|---|---|
| Size | 33.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59896702316e53ebe90c8f8bd2d349ad086da7cdd181185fb4fedb57dfc4cb37
|
|
BLAKE2b-256 checksum How to use checksums |
3d554575d44135d451ba8d714d6163ffb2b49951e54dcfa40045d37b656c306b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for computation-graph 77
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.