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 BeanTest:
def __init__(self, name):
self.name = name
@Bean()
def getTestBean() -> BeanTest:
return BeanTest("Test 123")
testBean = None
app = AppInitializer()
if __name__ == "__main__":
@Autowired()
def setTestBean(bean: BeanTest):
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.6.tar.gz
(30.9 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.6-py3-none-any.whl
(38.3 kB
view details)
File details
Details for the file cndi-2.7.6.tar.gz.
File metadata
- Download URL: cndi-2.7.6.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00c4ca3ab07abf0a8936470f68d2ff8540bee8819b6b8124a139f1fa8995302d
|
|
| MD5 |
53cea9ffef9cbf489a233213e4ab79c8
|
|
| BLAKE2b-256 |
c5cb24c3cdcb6bac48957c5f0d699b323ac59285320c903487b1ae23a2c92f37
|
File details
Details for the file cndi-2.7.6-py3-none-any.whl.
File metadata
- Download URL: cndi-2.7.6-py3-none-any.whl
- Upload date:
- Size: 38.3 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 |
c98a4904d353d76eab7da7fd84a6648babebaa727ba2b99c65dd3a07de050ddc
|
|
| MD5 |
6849a73e4cdb25ba03f8b9322a4deb22
|
|
| BLAKE2b-256 |
c3449568793bc0c81e51b91fa7f9f6405dfc88ac1c383cdf48006ecf24583522
|