README.md
This file
Path
README.md
133 lines · 4.8 KiB · Markdown
Last changed by
Version 0.14.0 (#1083)Tom Christiebefore adoption8c7729e
History of this fileTake it
The walk stopped after 200 commits: lines older than bc6163c point at it.
Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 1why, one step back1<p align="center">Use www.python-httpx.org domainTom Christiebefore adoption367bff6
line 2why, one step back2 <a href="https://www.python-httpx.org/"><img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'></a>Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 3–7why, one step back3</p>45<p align="center"><strong>HTTPX</strong> <em>- A next-generation HTTP client for Python.</em></p>67<p align="center">Test Suite on GitHub Actions (#907)Tom Christiebefore adoption19bf211
lines 8–9why, one step back8<a href="https://github.com/encode/httpx/actions">9 <img src="https://github.com/encode/httpx/workflows/Test%20Suite/badge.svg" alt="Test Suite">Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 10–15why, one step back10</a>11<a href="https://pypi.org/project/httpx/">12 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">13</a>14</p>15Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 16why, one step back16HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 17why, one step back17Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 18why, one step back18**Note**: _HTTPX should be considered in beta. We believe we've got the public API toVersion 0.14.0 (#1083)Tom Christiebefore adoption8c7729e
lines 19–20why, one step back19a stable point now, but would strongly recommend pinning your dependencies to the `0.14.*`20release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md). A 1.0 release is expected to be issued sometime around september 2020._Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 21–27why, one step back2122---2324Let's get started...2526```python27>>> import httpxProposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 28why, one step back28>>> r = httpx.get('https://www.example.org/')Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 29–38why, one step back29>>> r30<Response [200 OK]>31>>> r.status_code3220033>>> r.headers['content-type']34'text/html; charset=UTF-8'35>>> r.text36'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'37```38Add an async example to intro snippets (#750)Florimond Mancabefore adoption7d84408
lines 39–50why, one step back39Or, using the async API...4041_Use [IPython](https://ipython.readthedocs.io/en/stable/) or Python 3.8+ with `python -m asyncio` to try this code interactively._4243```python44>>> import httpx45>>> async with httpx.AsyncClient() as client:46>>> r = await client.get('https://www.example.org/')47>>> r48<Response [200 OK]>49```50Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 51–54why, one step back51## Features5253HTTPX builds on the well-established usability of `requests`, and gives you:54Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
lines 55–58why, one step back55* A broadly [requests-compatible API](https://www.python-httpx.org/compatibility/).56* Standard synchronous interface, but with [async support if you need it](https://www.python-httpx.org/async/).57* HTTP/1.1 [and HTTP/2 support](https://www.python-httpx.org/http2/).58* Ability to make requests directly to [WSGI applications](https://www.python-httpx.org/advanced/#calling-into-python-web-apps) or [ASGI applications](https://www.python-httpx.org/async/#calling-into-python-web-apps).Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 59–60why, one step back59* Strict timeouts everywhere.60* Fully type annotated.Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 61why, one step back61* 99% test coverage.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 62–88why, one step back6263Plus all the standard features of `requests`...6465* International Domains and URLs66* Keep-Alive & Connection Pooling67* Sessions with Cookie Persistence68* Browser-style SSL Verification69* Basic/Digest Authentication70* Elegant Key/Value Cookies71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response Bodies74* Multipart File Uploads75* HTTP(S) Proxy Support76* Connection Timeouts77* Streaming Downloads78* .netrc Support79* Chunked Requests8081## Installation8283Install with pip:8485```shell86$ pip install httpx87```88HTTP/2 becomes fully optional (#1140)Tom Christiebefore adoption8d9dfb5
lines 89–94why, one step back89Or, to include the optional HTTP/2 support, use:9091```shell92$ pip install httpx[http2]93```94Fix casing nits (#889)Florimond Mancabefore adoptiond63108d
line 95why, one step back95HTTPX requires Python 3.6+.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 96–98why, one step back9697## Documentation98Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 99why, one step back99Project documentation is available at [https://www.python-httpx.org/](https://www.python-httpx.org/).Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 100why, one step back100Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 101why, one step back101For a run-through of all the basics, head over to the [QuickStart](https://www.python-httpx.org/quickstart/).Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 102why, one step back102Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 103why, one step back103For more advanced topics, see the [Advanced Usage](https://www.python-httpx.org/advanced/) section, the [async support](https://www.python-httpx.org/async/) section, or the [HTTP/2](https://www.python-httpx.org/http2/) section.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 104why, one step back104Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 105why, one step back105The [Developer Interface](https://www.python-httpx.org/api/) provides a comprehensive API reference.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 106why, one step back106Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
lines 107–108why, one step back107To find out about tools that integrate with HTTPX, see [Third Party Packages](https://www.python-httpx.org/third-party-packages/).108Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 109–110why, one step back109## Contribute110Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 111why, one step back111If you want to contribute with HTTPX check out the [Contributing Guide](https://www.python-httpx.org/contributing/) to learn how to start.Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 112–114why, one step back112113## Dependencies114Fix casing nits (#889)Florimond Mancabefore adoptiond63108d
line 115why, one step back115The HTTPX project relies on these excellent libraries:Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
line 116why, one step back116Update dependencies in docs (#969)Tom Christiebefore adoption99a5c78
lines 117–118why, one step back117* `httpcore` - The underlying transport implementation for `httpx`.118 * `h11` - HTTP/1.1 support.HTTP/2 becomes fully optional (#1140)Tom Christiebefore adoption8d9dfb5
line 119why, one step back119 * `h2` - HTTP/2 support. *(Optional)*Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 120–124why, one step back120* `certifi` - SSL certificates.121* `chardet` - Fallback auto-detection for response encoding.122* `idna` - Internationalized domain name support.123* `rfc3986` - URL parsing & normalization.124* `sniffio` - Async library autodetection.Update dependencies in docs (#969)Tom Christiebefore adoption99a5c78
line 125why, one step back125* `urllib3` - Support for the `httpx.URLLib3Transport` class. *(Optional)*Record history of requests made during authentication (#718)Florimond Mancabefore adoptionbc6163c
lines 126–133why, one step back126* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*127128A huge amount of credit is due to `requests` for the API layout that129much of this work follows, as well as to `urllib3` for plenty of design130inspiration around the lower-level networking details.131132<p align="center">— ⭐️ —</p>133<p align="center"><i>HTTPX is <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>