Skip to main content

rulz is a decorator based IoC framework.

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

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

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.4.linux-x86_64.tar.gz (11.7 kB view hashes)

Uploaded Source

Built Distribution

rulz-0.0.4-py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page