Skip to main content

An easy to use lightweight dependency injection framework

Project description

Smart-injector is an lightweight dependency injection framework for Python. It was designed to be an easy to use tool to implement dependency injection in your application in a pythonic way.

Key features are: - Ligtweight - pure python - leverages type annotations - scopes - non invasive

Project Status


pip install smart-injector

You can also install the in-development version with:

pip install


Basic Usage:

>>> class A:
...     pass
>>> class B:
...     def __init__(self, a: A):
...         self.a = a
>>> container = create_container(StaticContainer)
>>> b = container.get(B)
>>> isinstance(b.a, A)


Detailed documentation can be found here:

Further usage examples can be found here:


To run the all tests run:


Note, to combine the coverage data from all the tox environments run:


set PYTEST_ADDOPTS=--cov-append


PYTEST_ADDOPTS=--cov-append tox


0.0.0 (2019-11-20)

  • First release on PyPI.

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

smart-injector-0.0.6.tar.gz (36.7 kB view hashes)

Uploaded source

Built Distribution

smart_injector-0.0.6-py2.py3-none-any.whl (23.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page