]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Add curio docs in Supported async environments (#1437)
authorshan7030 <42472191+shan7030@users.noreply.github.com>
Fri, 25 Dec 2020 15:57:14 +0000 (21:27 +0530)
committerGitHub <noreply@github.com>
Fri, 25 Dec 2020 15:57:14 +0000 (16:57 +0100)
Fixes: #1418
docs/async.md

index 3238097a8291221420f8525b1b51d7efe4d61ae5..69a1fb419fd68d3676b769d13e59adce0d3d40a7 100644 (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,