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.0.tar.gz
(30.6 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.0-py3-none-any.whl
(40.7 kB
view details)
File details
Details for the file cndi-2.6.0.tar.gz.
File metadata
- Download URL: cndi-2.6.0.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e44b048a91fa26d3a8d255a0ab36cc37d54d173cab98350abbb4e88f8a474e8
|
|
| MD5 |
2dc5af90a3e1239302cbf77be5c3ce6f
|
|
| BLAKE2b-256 |
ec9dc769dff7553cf17a8f115311591cbb8b34159878c0c242f48f67f579293c
|
File details
Details for the file cndi-2.6.0-py3-none-any.whl.
File metadata
- Download URL: cndi-2.6.0-py3-none-any.whl
- Upload date:
- Size: 40.7 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 |
1a46df989adb20491ad4ffade52d62ae490dbcc3f997aadcddc82e6632eda1f6
|
|
| MD5 |
b6945ae2d4c0f38ea1cd39e61b033794
|
|
| BLAKE2b-256 |
3a412e2058b221f7f5bfe006773b78e0c4efced1da91d8b1a28e69bce20777d8
|