Skip to content
Myr

Add curio docs in Supported async environments (#1437)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by shan7030 · committed by GitHub · parent e3a7b6d · Browse files · 1 file+21 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Fixes: #1418

Diff stats

1 file+21 added−0 removed

  • other:+21 added−0 removed

1 file+21 added−0 removed

modified:docs/async.md+21 added
154 unmodified lines
155156!!! important157 The `trio` package must be installed to use the Trio backend.158159160### [Curio](https://github.com/dabeaz/curio)161162Curio is a [coroutine-based library](https://curio.readthedocs.io/en/latest/tutorial.html)163for concurrent Python systems programming.164165```python166import httpx167import curio168169async def main():170 async with httpx.AsyncClient() as client:171 response = await client.get('https://www.example.com/')172 print(response)173174curio.run(main)175```176177!!! important178 The `curio` package must be installed to use the Curio backend.179180## Calling into Python Web Apps181182Just as `httpx.Client` allows you to call directly into WSGI web applications,183the `httpx.AsyncClient` class allows you to call directly into ASGI web applications.
43 unmodified lines