Skip to content

csams/rulz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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())

About

A decorator based IoC framework

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages