index.md
This file
Path
docs/index.md
135 lines · 4.1 KiB · Markdown
Last changed by
Version 0.13 (#971)Tom Christiebefore adoption2c2c6a7
History of this fileTake it
The walk stopped after 200 commits: lines older than 5ee512d point at it.
Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 1–12why, one step back1<p align="center" style="margin: 0 0 10px">2 <img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'>3</p>45<h1 align="center" style="font-size: 3rem; margin: -15px 0">6HTTPX7</h1>89---1011<div align="center">12<p>Test Suite on GitHub Actions (#907)Tom Christiebefore adoption19bf211
lines 13–14why, one step back13<a href="https://github.com/encode/httpx/actions">14 <img src="https://github.com/encode/httpx/workflows/Test%20Suite/badge.svg" alt="Test Suite">Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 15–23why, one step back15</a>16<a href="https://pypi.org/project/httpx/">17 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">18</a>19</p>2021<em>A next-generation HTTP client for Python.</em>22</div>23Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 24why, one step back24HTTPX 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.Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 25–27why, one step back252627!!! noteProposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 28why, one step back28 HTTPX should currently be considered in beta.Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
line 29why, one step back29Version 0.13 (#971)Tom Christiebefore adoption2c2c6a7
line 30why, one step back30 We believe we've got the public API to a stable point now, but would strongly recommend pinning your dependencies to the `0.13.*` release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md).Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
line 31why, one step back31Version 0.13.0.dev0 (#915)Tom Christiebefore adoptionbed3d8b
line 32why, one step back32 A 1.0 release is expected to be issued sometime around mid-2020.Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 33why, one step back33Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 34–39why, one step back34---3536Let's get started...3738```python39>>> import httpxProposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 40why, one step back40>>> r = httpx.get('https://www.example.org/')Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 41–50why, one step back41>>> r42<Response [200 OK]>43>>> r.status_code4420045>>> r.headers['content-type']46'text/html; charset=UTF-8'47>>> r.text48'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'49```50Add an async example to intro snippets (#750)Florimond Mancabefore adoption7d84408
lines 51–62why, one step back51Or, using the async API...5253_Use [IPython](https://ipython.readthedocs.io/en/stable/) or Python 3.8+ with `python -m asyncio` to try this code interactively._5455```python56>>> import httpx57>>> async with httpx.AsyncClient() as client:58>>> r = await client.get('https://www.example.org/')59>>> r60<Response [200 OK]>61```62Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 63–67why, one step back63## Features6465HTTPX is a high performance asynchronous HTTP client, that builds on the66well-established usability of `requests`, and gives you:67Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 68why, one step back68* A broadly [requests-compatible API](compatibility.md).Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
lines 69–70why, one step back69* Standard synchronous interface, but with [async support if you need it](async.md).70* HTTP/1.1 [and HTTP/2 support](http2.md).Use www.python-httpx.org domainTom Christiebefore adoptionb932d94
line 71why, one step back71* Ability to make requests directly to [WSGI applications](advanced.md#calling-into-python-web-apps) or [ASGI applications](async.md#calling-into-python-web-apps).Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 72–73why, one step back72* Strict timeouts everywhere.73* Fully type annotated.Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 74why, one step back74* 99% test coverage.Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 75–98why, one step back7576Plus all the standard features of `requests`...7778* International Domains and URLs79* Keep-Alive & Connection Pooling80* Sessions with Cookie Persistence81* Browser-style SSL Verification82* Basic/Digest Authentication83* Elegant Key/Value Cookies84* Automatic Decompression85* Automatic Content Decoding86* Unicode Response Bodies87* Multipart File Uploads88* HTTP(S) Proxy Support89* Connection Timeouts90* Streaming Downloads91* .netrc Support92* Chunked Requests9394## Documentation9596For a run-through of all the basics, head over to the [QuickStart](quickstart.md).9798For more advanced topics, see the [Advanced Usage](advanced.md) section,Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 99why, one step back99the [async support](async.md) section, or the [HTTP/2](http2.md) section.Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 100–102why, one step back100101The [Developer Interface](api.md) provides a comprehensive API reference.102Add 'Third Party Packages' docs page (#876)Florimond Mancabefore adoption21f5337
lines 103–104why, one step back103To find out about tools that integrate with HTTPX, see [Third Party Packages](third-party-packages.md).104Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 105–108why, one step back105## Dependencies106107The HTTPX project relies on these excellent libraries:108Update dependencies in docs (#969)Tom Christiebefore adoption99a5c78
lines 109–111why, one step back109* `httpcore` - The underlying transport implementation for `httpx`.110 * `h11` - HTTP/1.1 support.111 * `h2` - HTTP/2 support.Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 112–116why, one step back112* `certifi` - SSL certificates.113* `chardet` - Fallback auto-detection for response encoding.114* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.115* `idna` - Internationalized domain name support.116* `rfc3986` - URL parsing & normalization.Update dependencies in docs (#969)Tom Christiebefore adoption99a5c78
lines 117–118why, one step back117* `sniffio` - Async library autodetection.118* `urllib3` - Support for the `httpx.URLLib3Transport` class. *(Optional)*Fix Host header and HSTS when the default port is explicitly included in URL (#649)Tom Christiebefore adoption5ee512d
lines 119–135why, one step back119* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*120121A huge amount of credit is due to `requests` for the API layout that122much of this work follows, as well as to `urllib3` for plenty of design123inspiration around the lower-level networking details.124125## Installation126127Install with pip:128129```shell130$ pip install httpx131```132133HTTPX requires Python 3.6+134135[sync-support]: https://github.com/encode/httpx/issues/572