mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 17:47:02 +03:00
cf862fe8b5
* Add sketch * Cythonize MethodCaller * Cythonize ItemGetter, AttributeGetter & ProvidedInstance providers * Add docblock for .provided attribute * Refactor repr methods * Add .provided attribute to the Dependency provider * Add tests for the .provided attribute to the majority of the providers * Add docblock for the ProvidedInstance provider * Add docblocks for the rest of the providers * Add example of the provided instance usage * Add tests for provided instance* providers * Add complex provided instance example * Update example provided_instance.py * Add docs
34 lines
759 B
ReStructuredText
34 lines
759 B
ReStructuredText
.. _providers:
|
|
|
|
Providers
|
|
=========
|
|
|
|
Providers are strategies of accessing objects. They define how particular
|
|
objects are provided.
|
|
|
|
Every provider is callable (implements ``__call__()``). Every call to provider
|
|
instance returns provided result, according to the providing strategy of
|
|
particular provider.
|
|
|
|
Current documentation section consists from description of standard providers
|
|
library and some useful information like overriding of providers and writing
|
|
of custom providers.
|
|
|
|
Providers package API docs - :py:mod:`dependency_injector.providers`
|
|
|
|
.. toctree::
|
|
:maxdepth: 2
|
|
|
|
factory
|
|
singleton
|
|
callable
|
|
coroutine
|
|
object
|
|
list
|
|
configuration
|
|
selector
|
|
dependency
|
|
overriding
|
|
provided_instance
|
|
custom
|