Skip to main content

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)

Source distribution for rulz 0.0.5
File Size Uploaded
rulz-0.0.5.linux-x86_64.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rulz 0.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page