travis codecov docs gitter pypi black

Dependency Injection for Humans

Dependency Injection (or simply DI) is great technique. By using it you can organize responsibilities in you code base. Define high level policies and system behavior in one part. Delegate control to low level mechanisms from different part. Simple and powerful.

With help of DI you can use different parts of you system independently and combine their behavior really easy.

If you split logic and implementation into different classes, you will see how pleasant it became to change your system.

This tiny library helps you to connect parts of your system i.e. to inject low level implementation into high level behavior.


Dependency injection without dependencies

robot = Robot(

Dependency injection with dependencies

class Container(Injector):
    robot = Robot
    servo = Servo
    amplifier = Amplifier
    controller = Controller
    settings = Settings
    environment = "production"


Release version

Dependencies is available on PyPI - to install it just run:

pip install -U dependencies

That’s it! Once installed, dependencies are available to use. Import it and have fun.

Development version

You can always install last development version directly from source control:

pip install -U git+