Skip to main content

Python IOC Container

Project description


A fast and simple IOC Container for Python.


pyioc3 is a fast and simple inversion of control (ioc) container for python. An IoC container uses class constructor (or in this case init method parameters) to build and inject dependencies. pyioc3 takes advantage of python's type hint annotations to make injection flexible and easy to use.


I Love python. I also love OOP. I wanted better OOP in python. So i built this to help enforce SOLID and make my programs better.


Simple. Simple. Simple. Python is already flexible. An IOC container is something that you could whip up to suite your needs in an afternoon. Or you could install pyioc3 instead.

Quick Start

Install the package

pip install --user pyioc3

Make an

from pyioc3 import StaticContainerBuilder
from .ducks import Duck, RubberDucky
from .quacks import QuackBehavior, Squeak

ioc_builder = StaticContainerBuilder()

ioc =
__all__ = ["ioc"];

Use the container

from ioc import ioc
from .ducks import Duck

duck: Duck = ioc.get(Duck)

What More

  • Look at the examples.
  • Feel free to contribute.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyioc3, version 1.3.0
Filename, size File type Python version Upload date Hashes
Filename, size pyioc3-1.3.0.tar.gz (6.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page