pyungo
pyungo is a lightweight library to link a set of dependent functions together, and execute them in an ordered manner.
pyungo is built around Graphs and Nodes used in a DAG (Directed Acyclic Graph). A Node represent a function being run with a defined set of inputs and returning one or several outputs. A Graph is a collection of Nodes where data can flow in an logical manner, the output of one node serving as input of another.
installation
>> pip install pyungo
simple example
graph = Graph()
@graph.register()
def f_my_function_2(d, a):
e = d - a
return e
@graph.register()
def f_my_function_1(c):
d = c / 10
return d
@graph.register()
def f_my_function_3(a, b):
c = a + b
return c
res = graph.calculate(data={'a': 2, 'b': 3})
print(res)
pyungo is registering the functions at import time. It then resolve the DAG and figure out the sequence at which the functions have to be run per their inputs / outputs. In this case, it will be function 3 then 1 and finally 2.
The ordered Graph is run with calculate, with the given data. It returns the output of the last function being run (e), but all intermediate results are also available in the graph instance.
The result will be (a + b) / 10 - a = -1.5
links
Documentation: https://cedricleroy.github.io/pyungo/
Releases: https://pypi.org/project/pyungo/
Metadata
Release files for pyungo 0.9.0
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 |
|---|---|---|---|---|
| pyungo-0.9.0.tar.gz | 9.6 kB | Without provenance | Details for pyungo-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyungo-0.9.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for pyungo-0.9.0-py2.py3-none-any.whl |
Total release size: 21.1 kB
Release files / pyungo-0.9.0.tar.gz
| Download URL | pyungo-0.9.0.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a713df94dd8704bbe1c2587676568d6968fc55be06fb88e26fad7844ec58303
|
|
BLAKE2b-256 checksum How to use checksums |
874a71cb4fab712dbffe6c1335a28377d2021778a51f78c4ce8dfe4f9c705573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Release files / pyungo-0.9.0-py2.py3-none-any.whl
| Download URL | pyungo-0.9.0-py2.py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
773eddf38f7d703a510f0ca1b4d2a59ef3d8cfcdfa06e3d472d7ed48e8170645
|
|
BLAKE2b-256 checksum How to use checksums |
ff0eb6d69990a521e174ca95495db582df5a763c625f922743545b05fb8a2d6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Security for pyungo 0.9.0
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.