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-0.1.0.tar.gz
(30.0 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-0.1.0-py3-none-any.whl
(39.3 kB
view details)
File details
Details for the file cndi-0.1.0.tar.gz.
File metadata
- Download URL: cndi-0.1.0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a21ec74073f26435ca5fbea732db571ac20cb856ea864eae23c1313ef19a9132
|
|
| MD5 |
d5f0d5857baa8a33fefa3a3252c2aa78
|
|
| BLAKE2b-256 |
3c3779c263814f951b35d5804aaee16aca84d7df247f68369ae0c08350c77bba
|
File details
Details for the file cndi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cndi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.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 |
695cf95c43159a83e6eeb2affa8655dd6ac88ec1c0e965cca5e3187f8ef74186
|
|
| MD5 |
b74491dac81b558a3111dd63a3a36560
|
|
| BLAKE2b-256 |
a2d42d60d5cac24fc8441b50ad0e7a07e558cefa5dd44a123d44f03b279e432e
|