index.md
This file
Path
docs/index.md
125 lines · 3.5 KiB · Markdown
Last changed by
Drop sync (#544)Tom Christiebefore adoption206c537
History of this fileTake it
The walk stopped after 200 commits: lines older than 920925c point at it.
Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 1why, one step back1<p align="center" style="margin: 0 0 10px">Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
line 2why, one step back2 <img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'>Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 3why, one step back3</p>Version 0.1Tom Christiebefore adoption920925c
line 4why, one step back4Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 5–12why, one step back5<h1 align="center" style="font-size: 3rem; margin: -15px 0">6HTTPX7</h1>89---1011<div align="center">12<p>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 13–14why, one step back13<a href="https://travis-ci.org/encode/httpx">14 <img src="https://travis-ci.org/encode/httpx.svg?branch=master" alt="Build Status">Version 0.1Tom Christiebefore adoption920925c
line 15why, one step back15</a>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 16–17why, one step back16<a href="https://codecov.io/gh/encode/httpx">17 <img src="https://codecov.io/gh/encode/httpx/branch/master/graph/badge.svg" alt="Coverage">Version 0.1Tom Christiebefore adoption920925c
line 18why, one step back18</a>Branding updates for httpx (#130)Tom Christiebefore adoption17bb165
lines 19–20why, one step back19<a href="https://pypi.org/project/httpx/">20 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">Version 0.1Tom Christiebefore adoption920925c
line 21why, one step back21</a>Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 22why, one step back22</p>Version 0.1Tom Christiebefore adoption920925c
line 23why, one step back23Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 24–25why, one step back24<em>A next-generation HTTP client for Python.</em>25</div>Version 0.1Tom Christiebefore adoption920925c
line 26why, one step back26Drop sync (#544)Tom Christiebefore adoption206c537
line 27why, one step back27HTTPX is an asynchronous HTTP client, that supports HTTP/2 and HTTP/1.1.Version 0.1Tom Christiebefore adoption920925c
line 28why, one step back28Drop sync (#544)Tom Christiebefore adoption206c537
lines 29–36why, one step back29It can be used in high-performance async web frameworks, using either asyncio30or trio, and is able to support making large numbers of requests concurrently.3132!!! note33 The 0.8 release switched HTTPX into focusing exclusively on the async34 client. It is possible that we'll look at re-introducing a sync API at a35 later date.36Version 0.1Tom Christiebefore adoption920925c
lines 37–40why, one step back37---3839Let's get started...40Drop sync (#544)Tom Christiebefore adoption206c537
lines 41–46why, one step back41!!! note42 The standard Python REPL does not allow top-level async statements.4344 To run async examples directly you'll probably want to either use `ipython`,45 or use Python 3.8 with `python -m asyncio`.46Version 0.1Tom Christiebefore adoption920925c
line 47why, one step back47```pythonRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 48why, one step back48>>> import httpxDrop sync (#544)Tom Christiebefore adoption206c537
line 49why, one step back49>>> r = await httpx.get('https://www.example.org/')Int status codes (#92)Tom Christiebefore adoption56a7943
lines 50–51why, one step back50>>> r51<Response [200 OK]>Version 0.1Tom Christiebefore adoption920925c
line 52why, one step back52>>> r.status_codeInt status codes (#92)Tom Christiebefore adoption56a7943
line 53why, one step back53200Response.protocol -> Response.http_version (#250)Tom Christiebefore adoptionc1ec1c3
line 54why, one step back54>>> r.http_versionForce HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6
line 55why, one step back55'HTTP/1.1'Version 0.1Tom Christiebefore adoption920925c
lines 56–63why, one step back56>>> r.headers['content-type']57'text/html; charset=UTF-8'58>>> r.text59'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'60```6162## Features63Drop sync (#544)Tom Christiebefore adoption206c537
lines 64–65why, one step back64HTTPX is a high performance asynchronous HTTP client, that builds on the65well-established usability of `requests`, and gives you:Version 0.1Tom Christiebefore adoption920925c
line 66why, one step back66Drop sync (#544)Tom Christiebefore adoption206c537
line 67why, one step back67* A broadly requests-compatible API.Version 0.1Tom Christiebefore adoption920925c
line 68why, one step back68* HTTP/2 and HTTP/1.1 support.Drop sync (#544)Tom Christiebefore adoption206c537
line 69why, one step back69* Ability to [make requests directly to ASGI applications](advanced.md#calling-into-python-web-apps).Version 0.1Tom Christiebefore adoption920925c
lines 70–79why, one step back70* Strict timeouts everywhere.71* Fully type annotated.72* 100% test coverage.7374Plus all the standard features of `requests`...7576* International Domains and URLs77* Keep-Alive & Connection Pooling78* Sessions with Cookie Persistence79* Browser-style SSL VerificationDrop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec
line 80why, one step back80* Basic/Digest AuthenticationVersion 0.1Tom Christiebefore adoption920925c
lines 81–85why, one step back81* Elegant Key/Value Cookies82* Automatic Decompression83* Automatic Content Decoding84* Unicode Response Bodies85* Multipart File UploadsDrop sync (#544)Tom Christiebefore adoption206c537
line 86why, one step back86* HTTP(S) Proxy SupportVersion 0.1Tom Christiebefore adoption920925c
lines 87–88why, one step back87* Connection Timeouts88* Streaming DownloadsDocumented netrc support (#225)Can Sarıgölbefore adoption21939fd
line 89why, one step back89* .netrc SupportVersion 0.1Tom Christiebefore adoption920925c
lines 90–95why, one step back90* Chunked Requests9192## Documentation9394For a run-through of all the basics, head over to the [QuickStart](quickstart.md).95Drop sync (#544)Tom Christiebefore adoption206c537
line 96why, one step back96For more advanced topics, see the [Advanced Usage](advanced.md) section.Version 0.1Tom Christiebefore adoption920925c
lines 97–101why, one step back9798The [Developer Interface](api.md) provides a comprehensive API reference.99100## Dependencies101Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 102why, one step back102The HTTPX project relies on these excellent libraries:Version 0.1Tom Christiebefore adoption920925c
lines 103–107why, one step back103104* `h2` - HTTP/2 support.105* `h11` - HTTP/1.1 support.106* `certifi` - SSL certificates.107* `chardet` - Fallback auto-detection for response encoding.Merge pull request #315 from cansarigol/hstspreload-docTom Christiebefore adoption67d96b6
line 108why, one step back108* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.Version 0.1Tom Christiebefore adoption920925c
lines 109–114why, one step back109* `idna` - Internationalized domain name support.110* `rfc3986` - URL parsing & normalization.111* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*112113A huge amount of credit is due to `requests` for the API layout that114much 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 115why, one step back115inspiration around the lower-level networking details.Version 0.1Tom Christiebefore adoption920925c
lines 116–121why, one step back116117## Installation118119Install with pip:120121```shellRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 122why, one step back122$ pip install httpxVersion 0.1Tom Christiebefore adoption920925c
lines 123–124why, one step back123```124Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 125why, one step back125HTTPX requires Python 3.6+