mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-12-01 22:14:04 +03:00
Add cross links to async docs
This commit is contained in:
parent
0a484fa553
commit
c42bac1d74
|
@ -12,6 +12,12 @@ This example shows how to use ``Dependency Injector`` with `FastAPI <https://fas
|
||||||
|
|
||||||
The source code is available on the `Github <https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-redis>`_.
|
The source code is available on the `Github <https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-redis>`_.
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Provider :ref:`async-injections`
|
||||||
|
- Resource provider :ref:`resource-async-initializers`
|
||||||
|
- Wiring :ref:`async-injections-wiring`
|
||||||
|
|
||||||
Application structure
|
Application structure
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
@ -83,4 +89,10 @@ Sources
|
||||||
|
|
||||||
The source code is available on the `Github <https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-redis>`_.
|
The source code is available on the `Github <https://github.com/ets-labs/python-dependency-injector/tree/master/examples/miniapps/fastapi-redis>`_.
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Provider :ref:`async-injections`
|
||||||
|
- Resource provider :ref:`resource-async-initializers`
|
||||||
|
- Wiring :ref:`async-injections-wiring`
|
||||||
|
|
||||||
.. disqus::
|
.. disqus::
|
||||||
|
|
|
@ -100,3 +100,9 @@ To check the state of provider's async mode use:
|
||||||
- ``Provider.is_async_mode_enabled()``
|
- ``Provider.is_async_mode_enabled()``
|
||||||
- ``Provider.is_async_mode_disabled()``
|
- ``Provider.is_async_mode_disabled()``
|
||||||
- ``Provider.is_async_mode_undefined()``
|
- ``Provider.is_async_mode_undefined()``
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Wiring :ref:`async-injections-wiring`
|
||||||
|
- Resource provider :ref:`resource-async-initializers`
|
||||||
|
- :ref:`fastapi-redis-example`
|
||||||
|
|
|
@ -239,6 +239,8 @@ The example above produces next output:
|
||||||
Shutdown service
|
Shutdown service
|
||||||
127.0.0.1 - - [29/Oct/2020 22:39:41] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [29/Oct/2020 22:39:41] "GET / HTTP/1.1" 200 -
|
||||||
|
|
||||||
|
.. _resource-async-initializers:
|
||||||
|
|
||||||
Asynchronous initializers
|
Asynchronous initializers
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
@ -350,5 +352,11 @@ at least one asynchronous resource provider:
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
asyncio.run(main())
|
asyncio.run(main())
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Provider :ref:`async-injections`
|
||||||
|
- Wiring :ref:`async-injections-wiring`
|
||||||
|
- :ref:`fastapi-redis-example`
|
||||||
|
|
||||||
|
|
||||||
.. disqus::
|
.. disqus::
|
||||||
|
|
|
@ -189,6 +189,8 @@ You can use that in testing to re-create and re-wire a container before each tes
|
||||||
|
|
||||||
module.fn()
|
module.fn()
|
||||||
|
|
||||||
|
.. _async-injections-wiring:
|
||||||
|
|
||||||
Asynchronous injections
|
Asynchronous injections
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
@ -259,6 +261,12 @@ details on ``Closing`` marker.
|
||||||
It handles asynchronous injections only for ``async def`` functions. Asynchronous injections into
|
It handles asynchronous injections only for ``async def`` functions. Asynchronous injections into
|
||||||
synchronous ``def`` function still work, but you need to take care of awaitables by your own.
|
synchronous ``def`` function still work, but you need to take care of awaitables by your own.
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Provider :ref:`async-injections`
|
||||||
|
- Resource provider :ref:`resource-async-initializers`
|
||||||
|
- :ref:`fastapi-redis-example`
|
||||||
|
|
||||||
Integration with other frameworks
|
Integration with other frameworks
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user