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.3.tar.gz
(30.7 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.3-py3-none-any.whl
(40.5 kB
view details)
File details
Details for the file cndi-2.7.3.tar.gz.
File metadata
- Download URL: cndi-2.7.3.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
550cff853bab379c47654a2819a399cb8c3c2fb742b12a454ebb2f61b3912025
|
|
| MD5 |
89d356b733be08f2f5e829663b8d5e4b
|
|
| BLAKE2b-256 |
32f52871ea2e46d4ece2ebacbf64aebb609467998f75ef8bdee1373b44e42ab2
|
File details
Details for the file cndi-2.7.3-py3-none-any.whl.
File metadata
- Download URL: cndi-2.7.3-py3-none-any.whl
- Upload date:
- Size: 40.5 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 |
a9416c3d82ece479b9a6bbba8931d1132184cb78c7205a76029db4361e799eb9
|
|
| MD5 |
5d45a0a3bf6bd9340aadc6abe48db0b3
|
|
| BLAKE2b-256 |
acacb508129db26d7dc4162f3c88c84bc0ce9d20ef61515cc505936d110a5cc2
|