2016-06-06 11:26:53 +03:00
|
|
|
IoC Containers
|
|
|
|
==============
|
2016-06-03 00:48:06 +03:00
|
|
|
|
|
|
|
Containers are collections of providers. Main purpose of containers is to group
|
|
|
|
providers.
|
|
|
|
|
|
|
|
There are, actually, several popular cases of containers usage:
|
|
|
|
|
|
|
|
+ Keeping all providers in a single container.
|
|
|
|
+ Grouping of providers from the same architectural layer (for example,
|
|
|
|
``Services``, ``Models`` and ``Forms`` containers).
|
|
|
|
+ Grouping of providers from the same functional groups (for example,
|
|
|
|
container ``Users``, that contains all functional parts of ``Users``
|
|
|
|
component).
|
|
|
|
|
|
|
|
Also, for both of these and some other cases, it might be useful to attach
|
|
|
|
some init / shutdown functionality or something else, that deals with group
|
|
|
|
of providers.
|
|
|
|
|
2016-11-11 18:05:25 +03:00
|
|
|
Containers package API docs - :py:mod:`dependency_injector.containers`.
|
2016-06-03 00:48:06 +03:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
declarative
|
|
|
|
dynamic
|
|
|
|
specialization
|
|
|
|
overriding
|