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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyDye-15.10.7.tar.gz
(2.9 kB
view details)
File details
Details for the file pyDye-15.10.7.tar.gz.
File metadata
- Download URL: pyDye-15.10.7.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29fac2e3d7f1384c6ca86243141f573eb8f726a390f168c6af5b46d7ae7167ac
|
|
| MD5 |
aa646f332cd58c3f5569719f5d3ef246
|
|
| BLAKE2b-256 |
2a35022a8fe89020d6688c8b80e52faa2d0c728bc7abde5c08abd7b061bcc320
|