Skip to main content

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


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.5.tar.gz (30.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cndi-2.7.5-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file cndi-2.7.5.tar.gz.

File metadata

  • Download URL: cndi-2.7.5.tar.gz
  • Upload date:
  • Size: 30.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cndi-2.7.5.tar.gz
Algorithm Hash digest
SHA256 2da287ee42df1fb14ad3197341abea908c89475a6d1a769b81cc2386b78cee94
MD5 26b2b69a1561e0ba2a4cb8272ae25b4b
BLAKE2b-256 86128559b84dd105d247d488953827ddfcbd0a0840a9e6a532cd96554fccb47c

See more details on using hashes here.

File details

Details for the file cndi-2.7.5-py3-none-any.whl.

File metadata

  • Download URL: cndi-2.7.5-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cndi-2.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b73c7485c9c8f517d405c4d89314488efa7dd1f4861af6768671b126ab7760d7
MD5 c66044bbb85ba6da8758d45439186ba8
BLAKE2b-256 fe30343a06d3b804727e49e9aebf6d071b22f130dcf1a0e0737300116a87be9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page