2020-09-03 23:19:40 +03:00
|
|
|
.. _containers:
|
|
|
|
|
2020-08-14 23:27:17 +03:00
|
|
|
Containers
|
|
|
|
==========
|
2016-06-03 00:48:06 +03:00
|
|
|
|
2020-08-14 23:27:17 +03:00
|
|
|
Containers are collections of the providers.
|
2016-06-03 00:48:06 +03:00
|
|
|
|
2020-08-14 23:27:17 +03:00
|
|
|
There are several use cases how you can use containers:
|
2016-06-03 00:48:06 +03:00
|
|
|
|
2020-08-14 23:27:17 +03:00
|
|
|
+ Keeping all the providers in a single container (most common).
|
|
|
|
+ Grouping of the providers from the same architectural layer (for example,
|
2016-06-03 00:48:06 +03:00
|
|
|
``Services``, ``Models`` and ``Forms`` containers).
|
|
|
|
+ Grouping of providers from the same functional groups (for example,
|
2020-08-14 23:27:17 +03:00
|
|
|
container ``Users``, that contains all functional parts of the ``users``
|
|
|
|
package).
|
2016-06-03 00:48:06 +03:00
|
|
|
|
2020-09-01 04:26:21 +03:00
|
|
|
Containers module API docs - :py:mod:`dependency_injector.containers`.
|
2016-06-03 00:48:06 +03:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 2
|
|
|
|
|
|
|
|
declarative
|
|
|
|
dynamic
|
|
|
|
specialization
|
|
|
|
overriding
|
2021-02-06 01:14:10 +03:00
|
|
|
reset_singletons
|
2021-02-15 02:47:15 +03:00
|
|
|
check_dependencies
|
2021-02-01 17:42:21 +03:00
|
|
|
traversal
|