No project description provided
Project description
Install
pip install -U git+https://github.com/mayank31313/python-dependency-injection.git
Documentation
Documentation is shifted here
Example
Follow the below code to simplify understanding, or can also refer to main.py
from cndi.annotations import Bean, Autowired, AppInitializer
class TestBean:
def __init__(self, name):
self.name = name
@Bean()
def getTestBean() -> TestBean:
return TestBean("Test 123")
testBean = None
app = AppInitializer()
if __name__ == "__main__":
@Autowired()
def setTestBean(bean: TestBean):
global testBean
testBean = bean
app.run()
print(testBean.name)
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
cndi-2.6.1.tar.gz
(30.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cndi-2.6.1-py3-none-any.whl
(40.9 kB
view details)
File details
Details for the file cndi-2.6.1.tar.gz.
File metadata
- Download URL: cndi-2.6.1.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3ab3e44f7cd3f904bfea5b08bd8546fd627981e7d55afb1ed4eaeea2719bbd8
|
|
| MD5 |
0e06d9c6b4806be9f6217f99734874f0
|
|
| BLAKE2b-256 |
4ce4cf9bbc005c37d0c7283adbb6749d4773006a471dc11f85061eb43d38ac81
|
File details
Details for the file cndi-2.6.1-py3-none-any.whl.
File metadata
- Download URL: cndi-2.6.1-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f90294dcda0c1e9b14b0387ceab06e9d6580c859a84a764bea32819726469e1
|
|
| MD5 |
2e34a1c3ce170381259720d158c6485b
|
|
| BLAKE2b-256 |
ba3969d5b94dd60c9c678cf0d0324a2a6642257776893eccb383e06908697f68
|