mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
3ca6dd9af1
* Implement providers traversal in first precision * Implement traversal for all providers * Update traverse interface + add some tests * Refactor tests * Add tests for callable provider * Add configuration tests * Add Factory tests * Add FactoryAggrefate tests * Add .provides attribute to singleton providers * Add singleton provider tests * Add list and dict provider tests * Add resource tests * Add Container provider tests * Add Selector provider tests * Add ProvidedInstance provider tests * Add AttributeGetter provider tests * Add ItemGetter provider tests * Add MethodCaller provider tests * Refactor container interface * Update resource provider string representation * Add .initializer attribute to Resource provider * Add docs and examples * Remove not needed EOL in the tests * Make cosmetic refactoring * Ignore flake8 line width error in traverse example
27 lines
676 B
ReStructuredText
27 lines
676 B
ReStructuredText
.. _containers:
|
|
|
|
Containers
|
|
==========
|
|
|
|
Containers are collections of the providers.
|
|
|
|
There are several use cases how you can use containers:
|
|
|
|
+ Keeping all the providers in a single container (most common).
|
|
+ Grouping of the 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 the ``users``
|
|
package).
|
|
|
|
Containers module API docs - :py:mod:`dependency_injector.containers`.
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
declarative
|
|
dynamic
|
|
specialization
|
|
overriding
|
|
traversal
|