index.md
This file
Path
docs/index.md
122 lines · 3.7 KiB · Markdown
Last changed by
Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
History of this fileTake it
The walk stopped after 200 commits: lines older than 338a360 point at it.
Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 1–26why, 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>13<a href="https://travis-ci.org/encode/httpx">14 <img src="https://travis-ci.org/encode/httpx.svg?branch=master" alt="Build Status">15</a>16<a href="https://codecov.io/gh/encode/httpx">17 <img src="https://codecov.io/gh/encode/httpx/branch/master/graph/badge.svg" alt="Coverage">18</a>19<a href="https://pypi.org/project/httpx/">20 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">21</a>22</p>2324<em>A next-generation HTTP client for Python.</em>25</div>26Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 27why, one step back27HTTPX 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.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
line 28why, one step back28Drop sync (#544)Tom Christiebefore adoption206c537
lines 29–30why, one step back2930!!! noteProposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 31why, one step back31 HTTPX should currently be considered in beta.Drop sync (#544)Tom Christiebefore adoption206c537
line 32why, one step back32Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 33why, one step back33 We believe we've got the public API to a stable point now, but would strongly recommend pinning your dependencies to the `0.11.*` release, so that you're able to properly review API changes between package updates.Alpha note, and recommendations on pinning versions (#590)Tom Christiebefore adoptionc08ae77
line 34why, one step back34Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
lines 35–36why, one step back35 A 1.0 release is expected to be issued sometime on or before April 2020.36Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 37–42why, one step back37---3839Let's get started...4041```python42>>> import httpxProposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 43why, one step back43>>> r = httpx.get('https://www.example.org/')Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 44–55why, one step back44>>> r45<Response [200 OK]>46>>> r.status_code4720048>>> r.headers['content-type']49'text/html; charset=UTF-8'50>>> r.text51'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'52```5354## Features55Drop sync (#544)Tom Christiebefore adoption206c537
lines 56–57why, one step back56HTTPX is a high performance asynchronous HTTP client, that builds on the57well-established usability of `requests`, and gives you:Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
line 58why, one step back58Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
lines 59–62why, one step back59* A requests-compatible API wherever possible.60* Standard synchronous interface, but with [async support if you need it](async.md).61* HTTP/1.1 [and HTTP/2 support](http2.md).62* Ability to make requests directly to [WSGI applications](https://www.encode.io/httpx/advanced/#calling-into-python-web-apps) or [ASGI applications](https://www.encode.io/httpx/async/#calling-into-python-web-apps).Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 63–64why, one step back63* Strict timeouts everywhere.64* Fully type annotated.Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 65why, one step back65* 99% test coverage.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 66–72why, one step back6667Plus all the standard features of `requests`...6869* International Domains and URLs70* Keep-Alive & Connection Pooling71* Sessions with Cookie Persistence72* Browser-style SSL VerificationDrop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec
line 73why, one step back73* Basic/Digest AuthenticationUse a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 74–78why, one step back74* Elegant Key/Value Cookies75* Automatic Decompression76* Automatic Content Decoding77* Unicode Response Bodies78* Multipart File UploadsDrop sync (#544)Tom Christiebefore adoption206c537
line 79why, one step back79* HTTP(S) Proxy SupportUse a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 80–88why, one step back80* Connection Timeouts81* Streaming Downloads82* .netrc Support83* Chunked Requests8485## Documentation8687For a run-through of all the basics, head over to the [QuickStart](quickstart.md).88Better HTTP/2 defaults. (#584)Tom Christiebefore adoption30229f1
line 89why, one step back89For more advanced topics, see the [Advanced Usage](advanced.md) section,Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 90why, one step back90the [async support](async.md) section, or the [HTTP/2](http2.md) section.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 91–97why, one step back9192The [Developer Interface](api.md) provides a comprehensive API reference.9394## Dependencies9596The HTTPX project relies on these excellent libraries:97Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 98why, one step back98* `urllib3` - Sync client support.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
line 99why, one step back99* `h11` - HTTP/1.1 support.Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919
line 100why, one step back100* `h2` - HTTP/2 support.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 101–109why, one step back101* `certifi` - SSL certificates.102* `chardet` - Fallback auto-detection for response encoding.103* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.104* `idna` - Internationalized domain name support.105* `rfc3986` - URL parsing & normalization.106* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*107108A huge amount of credit is due to `requests` for the API layout that109much of this work follows, as well as to `urllib3` for plenty of designFix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5
line 110why, one step back110inspiration around the lower-level networking details.Use a certificate issued from the trustme CA in tests (#357)Jamie Hewlandbefore adoption338a360
lines 111–120why, one step back111112## Installation113114Install with pip:115116```shell117$ pip install httpx118```119120HTTPX requires Python 3.6+Alpha note, and recommendations on pinning versions (#590)Tom Christiebefore adoptionc08ae77
lines 121–122why, one step back121122[sync-support]: https://github.com/encode/httpx/issues/572