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 hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page