rulz
A decorator based IoC framework for python3.6+. There are no runtime dependencies outside of what's in the standard library.
A demo module is in rulz/plugins/demo.py.
#!/usr/bin/env python
from rulz import plugin, run_graph
@plugin()
def one():
return 1
@plugin()
def two():
return 2
@plugin(one, two)
def add(a, b):
return a + b
if __name__ == "__main__":
print(run_graph())
Invoke it directly or create a driver script like this:
#!/usr/bin/env python
from rulz import load, run_graph
load("rulz.plugins")
print(run_graph())
Metadata
Release files for rulz 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rulz-0.0.5.linux-x86_64.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rulz-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / rulz-0.0.5.linux-x86_64.tar.gz
| Download URL | rulz-0.0.5.linux-x86_64.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28cfb3d8b13a391ab9ed74c9081fbf2f4734f3b98256625187565a5be01da383
|
|
BLAKE2b-256 checksum How to use checksums |
948a0829f45892a53c75650e18895fb80011325a77139f4e36e18f6a090d5dcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / rulz-0.0.5-py3-none-any.whl
| Download URL | rulz-0.0.5-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af9c3cfef6a4576b09734f50435da808e6ecb64a5bba05fa017408bda9567bba
|
|
BLAKE2b-256 checksum How to use checksums |
44e17b8b31c96c3161fb6e5f29a9ad97bdb3cb8541105dd5afcfde0fe8d1ef08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|