python-dependency-injector/docs/containers/check_dependencies.rst
Roman Mogylatov 8eea9c4e45
Implement container.check_dependencies() (#396)
* Add implementation, typing stubs, and tests

* Add docs and example

* Update changelog
2021-02-14 18:47:15 -05:00

19 lines
510 B
ReStructuredText

.. _check-container-dependencies:
Check container dependencies
----------------------------
To check container dependencies use method ``.check_dependencies()``.
.. literalinclude:: ../../examples/containers/check_dependencies.py
:language: python
:lines: 3-
:emphasize-lines: 12
Method ``.check_dependencies()`` raises an error if container has any undefined dependencies.
If all dependencies are provided or have defaults, no error is raised.
See also: :ref:`dependency-provider`.
.. disqus::