You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*The following is a design proposal and is not yet fully functional. The work is well underway, tho be aware that some parts of the codebase are still under development.*
9
+
A complete HTTP toolkit for Python. Supporting both client & server, and available in either sync or async flavors.
>>> async with httpx.serve_http(hello_world) as server:
74
+
... print(f"Serving on {server.url} (Press CTRL+C to quit)")
75
+
... await server.serve()
45
76
Serving on http://127.0.0.1:8080/ (Press CTRL+C to quit)
46
77
```
47
78
48
79
---
49
80
50
-
Features include...
81
+
Some things HTTPX supports...
51
82
52
-
* Available in either sync or async flavours.
53
-
* A comprehensive set of HTTP components, with immutability throughout.
54
-
* A low complexity stack, with no required dependencies.
55
-
* Type annotation throughout.
83
+
* Use it as an HTTP client, to interact with the web.
84
+
* Use it as an HTTP server, to create web APIs, applications, or websites.
85
+
* Use it as a general purpose toolkit, for working with URLs, query parameters & forms.
86
+
* Use it to build networking components, such as proxies.
87
+
88
+
Components provided by HTTPX are immutable by default, and provide tightly typed interfaces. The package has a light installation footprint, minimal stdlib imports, and no dependencies.
56
89
57
90
---
58
91
59
92
# Documentation
60
93
61
-
The httpx 1.0 [design proposal](https://www.encode.io/httpnext/) is now available.
62
-
63
94
*[Quickstart](docs/quickstart.md)
64
95
*[Clients](docs/clients.md)
65
96
*[Servers](docs/servers.md)
@@ -78,19 +109,10 @@ The httpx 1.0 [design proposal](https://www.encode.io/httpnext/) is now availabl
78
109
79
110
The design repository for this work is currently private. We are looking towards a development model that encourages a calm focused working environment, and are currently taking a little time to work through expectations & boundaries for contributions to the codebase.
80
111
81
-
---
82
-
83
-
# Background
84
-
85
-
If you've been working with 0.x versions of HTTPX you'll notice significant API differences.
86
-
87
-
Version 1.0 provides a much more tightly constrained API. It has a lighter installation footprint, far more obvious type annotations, and a lower overall complexity.
88
-
89
-
For example:
112
+
Getting to 1.0 has required reworking from the ground up, and presents a significantly sharper API than previous versions. Pin your dependencies. We are currently in prerelease mode.
90
113
91
-
* Client code [before](https://github.com/encode/httpx/blob/master/httpx/_client.py) and [after](https://github.com/encode/httpnext/blob/dev/src/httpx/_client.py).
92
-
* Response code [before](https://github.com/encode/httpx/blob/master/httpx/_models.py#L515) and [after](https://github.com/encode/httpnext/blob/dev/src/httpx/_response.py).
114
+
This work is made possible through [project sponsorships](https://github.com/sponsors/encode). Your support is greatly appreciated.
93
115
94
116
---
95
117
96
-
<palign="center"><i>This provisional design work is <ahref="https://www.encode.io/httpnext/about/">not currently licensed</a> for reuse.</i><br/>— 🦋 —</p>
118
+
<palign="center"><i>This design work is <ahref="https://www.encode.io/httpnext/about/">not yet licensed</a> for reuse.</i><br/>— 🦋 —</p>
0 commit comments