Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than 920925c point at it.

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 1why, one step back
1<p align="center" style="margin: 0 0 10px">

Branding updates for httpx (#130)Tom Christiebefore adoption17bb165

line 2why, one step back
2 <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 back
3</p>

Version 0.1Tom Christiebefore adoption920925c

line 4why, one step back
4

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

lines 5–12why, one step back
5<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 back
13<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 back
15</a>

Branding updates for httpx (#130)Tom Christiebefore adoption17bb165

lines 16–17why, one step back
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">

Version 0.1Tom Christiebefore adoption920925c

line 18why, one step back
18</a>

Branding updates for httpx (#130)Tom Christiebefore adoption17bb165

lines 19–20why, one step back
19<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 back
21</a>

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 22why, one step back
22</p>

Version 0.1Tom Christiebefore adoption920925c

line 23why, one step back
23

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

lines 24–25why, one step back
24<em>A next-generation HTTP client for Python.</em>
25</div>

Version 0.1Tom Christiebefore adoption920925c

line 26why, one step back
26

Drop sync (#544)Tom Christiebefore adoption206c537

line 27why, one step back
27HTTPX is an asynchronous HTTP client, that supports HTTP/2 and HTTP/1.1.

Version 0.1Tom Christiebefore adoption920925c

line 28why, one step back
28

Drop sync (#544)Tom Christiebefore adoption206c537

lines 29–36why, one step back
29It can be used in high-performance async web frameworks, using either asyncio
30or 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.36

Version 0.1Tom Christiebefore adoption920925c

lines 37–40why, one step back
37---
3839Let's get started...40

Drop sync (#544)Tom Christiebefore adoption206c537

lines 41–46why, one step back
41!!! note
42 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`.46

Version 0.1Tom Christiebefore adoption920925c

line 47why, one step back
47```python

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 48why, one step back
48>>> import httpx

Drop sync (#544)Tom Christiebefore adoption206c537

line 49why, one step back
49>>> r = await httpx.get('https://www.example.org/')

Int status codes (#92)Tom Christiebefore adoption56a7943

lines 50–51why, one step back
50>>> r
51<Response [200 OK]>

Version 0.1Tom Christiebefore adoption920925c

line 52why, one step back
52>>> r.status_code

Int status codes (#92)Tom Christiebefore adoption56a7943

line 53why, one step back
53200

Response.protocol -> Response.http_version (#250)Tom Christiebefore adoptionc1ec1c3

line 54why, one step back
54>>> r.http_version

Force HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6

line 55why, one step back
55'HTTP/1.1'

Version 0.1Tom Christiebefore adoption920925c

lines 56–63why, one step back
56>>> 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## Features63

Drop sync (#544)Tom Christiebefore adoption206c537

lines 64–65why, one step back
64HTTPX is a high performance asynchronous HTTP client, that builds on the
65well-established usability of `requests`, and gives you:

Version 0.1Tom Christiebefore adoption920925c

line 66why, one step back
66

Drop sync (#544)Tom Christiebefore adoption206c537

line 67why, one step back
67* A broadly requests-compatible API.

Version 0.1Tom Christiebefore adoption920925c

line 68why, one step back
68* HTTP/2 and HTTP/1.1 support.

Drop sync (#544)Tom Christiebefore adoption206c537

line 69why, one step back
69* 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 back
70* 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 Verification

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 80why, one step back
80* Basic/Digest Authentication

Version 0.1Tom Christiebefore adoption920925c

lines 81–85why, one step back
81* Elegant Key/Value Cookies
82* Automatic Decompression83* Automatic Content Decoding84* Unicode Response Bodies85* Multipart File Uploads

Drop sync (#544)Tom Christiebefore adoption206c537

line 86why, one step back
86* HTTP(S) Proxy Support

Version 0.1Tom Christiebefore adoption920925c

lines 87–88why, one step back
87* Connection Timeouts
88* Streaming Downloads

Documented netrc support (#225)Can Sarıgölbefore adoption21939fd

line 89why, one step back
89* .netrc Support

Version 0.1Tom Christiebefore adoption920925c

lines 90–95why, one step back
90* Chunked Requests
9192## Documentation9394For a run-through of all the basics, head over to the [QuickStart](quickstart.md).95

Drop sync (#544)Tom Christiebefore adoption206c537

line 96why, one step back
96For more advanced topics, see the [Advanced Usage](advanced.md) section.

Version 0.1Tom Christiebefore adoption920925c

lines 97–101why, one step back
97
98The [Developer Interface](api.md) provides a comprehensive API reference.99100## Dependencies101

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 102why, one step back
102The HTTPX project relies on these excellent libraries:

Version 0.1Tom Christiebefore adoption920925c

lines 103–107why, one step back
103
104* `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 back
108* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.

Version 0.1Tom Christiebefore adoption920925c

lines 109–114why, one step back
109* `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 design

Fix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5

line 115why, one step back
115inspiration around the lower-level networking details.

Version 0.1Tom Christiebefore adoption920925c

lines 116–121why, one step back
116
117## Installation118119Install with pip:120121```shell

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 122why, one step back
122$ pip install httpx

Version 0.1Tom Christiebefore adoption920925c

lines 123–124why, one step back
123```
124

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 125why, one step back
125HTTPX requires Python 3.6+