rulz is a IoC framework for system analysis
Project description
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())
You can either invoke it directly or create a driver script like this:
#!/usr/bin/env python
from rulz import load_components, run_graph
load_components("rulz.plugins")
print(run_graph())
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rulz-0.0.1.linux-x86_64.tar.gz
(10.4 kB
view hashes)
Built Distribution
rulz-0.0.1-py3-none-any.whl
(10.3 kB
view hashes)