IoC (Inversion of Control) Dependency InjectionΒΆ

Support for automatic resolution of dependencies from factories.

These methods are built around data annotations and abc module.

Usage:

# Register factory with framework
>>> pyapp.injection.register_factory(FooABC, foo_factory)

# Mark functions for injection and specify type
>>> @inject
... def my_function(foo: FooABC = Args(name="second")):
...    ...

What my_function is called a concrete instance that implements FooABC is passed into the function.