Skip to main content

Rudimentary dependency Injection framework

Project description

A rudimentary Dependency injection framework in python.

The dependencies are defined in a yaml file as mentioned below. Th objects are created by referring to the namespace defined in yaml for the desired object.

Main modules are:

  • jtk.di.dye

Sample Code:

dye.load_di('pydi.yaml')

s = dye.get_instance('jubin.body')

s.print()
  • main.py

Objects created can also reference other objects.

Config file

  • pydi.yaml

Comes in this format:

namespace1:
  class: class_name
  class_attr:
    attr: value
  const_args:
    attr: value
    attr: 'ref:namespace2'
  inst_attr:
    attr: value
    attr: value

namespace2:
  class: class_name
  const_args:
    attr: value

PyPI URL.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyDye, version 15.10.7
Filename, size File type Python version Upload date Hashes
Filename, size pyDye-15.10.7.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page