Skip to content

Commit 16596bc

Browse files
review feedback
1 parent 36393b7 commit 16596bc

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/guide/async.asciidoc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ $ python -m pip install elasticsearch aiohttp
1515
$ python -m pip install elasticsearch[async]
1616
----
1717

18+
[discrete]
1819
=== Getting Started with Async
1920

2021
After installation all async API endpoints are available via
2122
`~elasticsearch.AsyncElasticsearch` and are used in the same way as
22-
other APIs, just with an extra `await`:
23+
other APIs, with an extra `await`:
2324

2425
[source,python]
2526
----
@@ -43,10 +44,13 @@ loop.run_until_complete(main())
4344
All APIs that are available under the sync client are also available
4445
under the async client.
4546

47+
https://elasticsearch-py.readthedocs.io/en/latest/async.html#api-reference[Reference documentation]
48+
49+
[discrete]
4650
=== ASGI Applications and Elastic APM
4751

4852
https://asgi.readthedocs.io[ASGI] (Asynchronous Server Gateway
49-
Interface) is a new way to serve Python web applications making use of
53+
Interface) is a way to serve Python web applications making use of
5054
async I/O to achieve better performance. Some examples of ASGI
5155
frameworks include FastAPI, Django 3.0+, and Starlette. If you're
5256
using one of these frameworks along with Elasticsearch then you should
@@ -61,8 +65,12 @@ https://fastapi.tiangolo.com/[FastAPI] and APM tracing there is a
6165
https://github.com/elastic/elasticsearch-py/tree/master/examples/fastapi-apm[pre-built
6266
example] in the `examples/fastapi-apm` directory.
6367

68+
See also the <<opentelemetry>> page.
69+
70+
[discrete]
6471
=== Frequently Asked Questions
6572

73+
[discrete]
6674
==== ValueError when initializing `AsyncElasticsearch`?
6775

6876
If when trying to use `AsyncElasticsearch` you receive
@@ -71,6 +79,7 @@ you should ensure that you have `aiohttp` installed in your environment
7179
(check with `$ python -m pip freeze | grep aiohttp`). Otherwise,
7280
async support won't be available.
7381

82+
[discrete]
7483
==== What about the `elasticsearch-async` package?
7584

7685
Previously asyncio was supported separately via the
@@ -79,6 +88,7 @@ package. The `elasticsearch-async` package has been deprecated in favor
7988
of `AsyncElasticsearch` provided by the `elasticsearch` package in v7.8
8089
and onwards.
8190

91+
[discrete]
8292
==== Receiving 'Unclosed client session / connector' warning?
8393

8494
This warning is created by `aiohttp` when an open HTTP connection is
@@ -117,6 +127,7 @@ async def main():
117127
You can run this example by saving it to `main.py` and executing
118128
`ELASTICSEARCH_URL=http://localhost:9200 uvicorn main:app`.
119129

130+
[discrete]
120131
=== Async Helpers
121132

122133
Async variants of all helpers are available in `elasticsearch.helpers`
@@ -125,3 +136,6 @@ are identical to the ones in the sync <<client-helpers>> documentation.
125136

126137
All async helpers that accept an iterator or generator also accept async
127138
iterators and async generators.
139+
140+
https://elasticsearch-py.readthedocs.io/en/latest/async.html#async-helpers[Reference documentation]
141+

0 commit comments

Comments
 (0)