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.5.linux-x86_64.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rulz-0.0.5-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file rulz-0.0.5.linux-x86_64.tar.gz.

File metadata

  • Download URL: rulz-0.0.5.linux-x86_64.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for rulz-0.0.5.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 28cfb3d8b13a391ab9ed74c9081fbf2f4734f3b98256625187565a5be01da383
MD5 3b18f312b9be575ff57c065627273a42
BLAKE2b-256 948a0829f45892a53c75650e18895fb80011325a77139f4e36e18f6a090d5dcd

See more details on using hashes here.

File details

Details for the file rulz-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: rulz-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for rulz-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 af9c3cfef6a4576b09734f50435da808e6ecb64a5bba05fa017408bda9567bba
MD5 689843b1ecdfaa869cb6e4cf97cbcd70
BLAKE2b-256 44e17b8b31c96c3161fb6e5f29a9ad97bdb3cb8541105dd5afcfde0fe8d1ef08

See more details on using hashes here.

Supported by

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