Skip to main content

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)

Metadata

Release files for cndi 2.7.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cndi 2.7.9
File Size Uploaded Provenance Actions
cndi-2.7.9.tar.gz 31.2 kB Without provenance Details for cndi-2.7.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cndi 2.7.9
File Interpreter ABI Platform Actions
cndi-2.7.9-py3-none-any.whl Python 3 none any Details for cndi-2.7.9-py3-none-any.whl

Total release size: 70.3 kB

Release files / cndi-2.7.9.tar.gz

Download URL cndi-2.7.9.tar.gz
Size 31.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a1834c30b3af41a57da69af11ac84790e16242c1603a7bd95f7e8979bbc3eab8
BLAKE2b-256 checksum
How to use checksums
fef80e8adcd02a47b731ae106a7004f81507f8942d2136974e2485512de9e108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / cndi-2.7.9-py3-none-any.whl

Download URL cndi-2.7.9-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e1b8bdf3ecb8d30c0a40286f2d380241bbba4bbbc1e12300d25304376b01cae
BLAKE2b-256 checksum
How to use checksums
14d18000a1aea1d6c9f3a22ba4542cb727e9058d4292250ffe022b3818017c37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for cndi 2.7.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.7.9 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page