From c42bac1d74947828027d2ef42f29f4c3937cf987 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Sun, 10 Jan 2021 19:00:14 -0500 Subject: [PATCH] Add cross links to async docs --- docs/examples/fastapi-redis.rst | 12 ++++++++++++ docs/providers/async.rst | 6 ++++++ docs/providers/resource.rst | 8 ++++++++ docs/wiring.rst | 8 ++++++++ 4 files changed, 34 insertions(+) diff --git a/docs/examples/fastapi-redis.rst b/docs/examples/fastapi-redis.rst index 8201d432..2e120cc8 100644 --- a/docs/examples/fastapi-redis.rst +++ b/docs/examples/fastapi-redis.rst @@ -12,6 +12,12 @@ This example shows how to use ``Dependency Injector`` with `FastAPI `_. +See also: + +- Provider :ref:`async-injections` +- Resource provider :ref:`resource-async-initializers` +- Wiring :ref:`async-injections-wiring` + Application structure --------------------- @@ -83,4 +89,10 @@ Sources The source code is available on the `Github `_. +See also: + +- Provider :ref:`async-injections` +- Resource provider :ref:`resource-async-initializers` +- Wiring :ref:`async-injections-wiring` + .. disqus:: diff --git a/docs/providers/async.rst b/docs/providers/async.rst index 61fe74b3..312bb33c 100644 --- a/docs/providers/async.rst +++ b/docs/providers/async.rst @@ -100,3 +100,9 @@ To check the state of provider's async mode use: - ``Provider.is_async_mode_enabled()`` - ``Provider.is_async_mode_disabled()`` - ``Provider.is_async_mode_undefined()`` + +See also: + +- Wiring :ref:`async-injections-wiring` +- Resource provider :ref:`resource-async-initializers` +- :ref:`fastapi-redis-example` diff --git a/docs/providers/resource.rst b/docs/providers/resource.rst index d4724f76..ad255511 100644 --- a/docs/providers/resource.rst +++ b/docs/providers/resource.rst @@ -239,6 +239,8 @@ The example above produces next output: Shutdown service 127.0.0.1 - - [29/Oct/2020 22:39:41] "GET / HTTP/1.1" 200 - +.. _resource-async-initializers: + Asynchronous initializers ------------------------- @@ -350,5 +352,11 @@ at least one asynchronous resource provider: if __name__ == '__main__': asyncio.run(main()) +See also: + +- Provider :ref:`async-injections` +- Wiring :ref:`async-injections-wiring` +- :ref:`fastapi-redis-example` + .. disqus:: diff --git a/docs/wiring.rst b/docs/wiring.rst index 55741b3b..79314b64 100644 --- a/docs/wiring.rst +++ b/docs/wiring.rst @@ -189,6 +189,8 @@ You can use that in testing to re-create and re-wire a container before each tes module.fn() +.. _async-injections-wiring: + Asynchronous injections ----------------------- @@ -259,6 +261,12 @@ details on ``Closing`` marker. 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. +See also: + +- Provider :ref:`async-injections` +- Resource provider :ref:`resource-async-initializers` +- :ref:`fastapi-redis-example` + Integration with other frameworks ---------------------------------