Add curio docs in Supported async environments (#1437)

Fixes: #1418
This commit is contained in:
shan7030 2020-12-25 21:27:14 +05:30 committed by GitHub
parent e3a7b6d731
commit f4165e9e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -156,6 +156,27 @@ trio.run(main)
!!! important
The `trio` package must be installed to use the Trio backend.
### [Curio](https://github.com/dabeaz/curio)
Curio is a [coroutine-based library](https://curio.readthedocs.io/en/latest/tutorial.html)
for concurrent Python systems programming.
```python
import httpx
import curio
async def main():
async with httpx.AsyncClient() as client:
response = await client.get('https://www.example.com/')
print(response)
curio.run(main)
```
!!! important
The `curio` package must be installed to use the Curio backend.
## Calling into Python Web Apps
Just as `httpx.Client` allows you to call directly into WSGI web applications,