mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
15 lines
449 B
ReStructuredText
15 lines
449 B
ReStructuredText
Container copying
|
|
-----------------
|
|
|
|
You can create declarative container copies using ``@containers.copy()`` decorator.
|
|
|
|
.. literalinclude:: ../../examples/containers/declarative_copy_decorator.py
|
|
:language: python
|
|
:lines: 3-
|
|
:emphasize-lines: 18-22
|
|
|
|
Decorator ``@containers.copy()`` copies providers from source container to destination container.
|
|
Destination container provider will replace source provider, if names match.
|
|
|
|
.. disqus::
|