mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 21:46:17 +03:00
Update container docs
This commit is contained in:
parent
dd0fa17ad4
commit
7270236811
|
@ -32,7 +32,6 @@ factories:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/declarative.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Example of declarative containers inheritance:
|
||||
|
||||
|
@ -42,7 +41,6 @@ Example of declarative containers inheritance:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/declarative_inheritance.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Example of declarative containers's provider injections:
|
||||
|
||||
|
@ -52,7 +50,6 @@ Example of declarative containers's provider injections:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/declarative_injections.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
|
||||
.. disqus::
|
||||
|
|
|
@ -17,14 +17,12 @@ Here is an simple example of defining dynamic container with several factories:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/dynamic.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Next example demonstrates creation of dynamic container based on some
|
||||
configuration:
|
||||
|
||||
.. literalinclude:: ../../examples/containers/dynamic_runtime_creation.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
|
||||
.. disqus::
|
||||
|
|
|
@ -18,13 +18,11 @@ method:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/override_declarative.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Example of overriding container using :py:func:`override` decorator:
|
||||
|
||||
.. literalinclude:: ../../examples/containers/override_declarative_decorator.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Also there are several useful :py:class:`DeclarativeContainer` methods and
|
||||
properties that help to work with container overridings:
|
||||
|
|
|
@ -14,14 +14,12 @@ for limitation of its provided type:
|
|||
|
||||
.. literalinclude:: ../../examples/containers/declarative_provider_type.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
Limitation for providers type could be used with :py:class:`DynamicContainer`
|
||||
as well:
|
||||
|
||||
.. literalinclude:: ../../examples/containers/dynamic_provider_type.py
|
||||
:language: python
|
||||
:linenos:
|
||||
|
||||
|
||||
.. disqus::
|
||||
|
|
Loading…
Reference in New Issue
Block a user