Add your description here
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.7.4.tar.gz
(30.3 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.7.4-py3-none-any.whl
(38.8 kB
view details)
File details
Details for the file cndi-2.7.4.tar.gz.
File metadata
- Download URL: cndi-2.7.4.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33450b948c081225061612cb4ef995bf1b0e8a304164821a096cd21ce34b5b6f
|
|
| MD5 |
e11518c9e2d748d860d98853b154238f
|
|
| BLAKE2b-256 |
2a0353805d5adbfb948d5c3359e18b4e48de5de964a17a84b41b30e2a66c36d7
|
File details
Details for the file cndi-2.7.4-py3-none-any.whl.
File metadata
- Download URL: cndi-2.7.4-py3-none-any.whl
- Upload date:
- Size: 38.8 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 |
009447bcac3e7aeabc42a226c9b9b1c4e4001f928cf298d54e639e597b31a509
|
|
| MD5 |
cfa64acc2ca8e4dde44ff32e85306d0b
|
|
| BLAKE2b-256 |
0ad5107baaa09a73b58ff43f608430a8c4014a5f6bd83a23f402794b09b1edf3
|