Skip to content
Myr

index.md

This file

Path

docs/index.md

116 lines · 3.3 KiB · Markdown

Last changed by

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

History of this file

Take 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>

http3 (#86)Tom Christiebefore adoptionc9747aa

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">

http3 (#86)Tom Christiebefore adoptionc9747aa

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">

http3 (#86)Tom Christiebefore adoptionc9747aa

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">

http3 (#86)Tom Christiebefore adoptionc9747aa

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

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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

http3 (#86)Tom Christiebefore adoptionc9747aa

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>

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 26–35why, one step back
26
27!!! warning28 This project should be considered as an "alpha" release. It is substantially29 API complete, but there are still some areas that need more work.3031---3233Let's get started...3435```python

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

lines 36–37why, one step back
36>>> import httpx
37>>> r = httpx.get('https://www.example.org/')

Int status codes (#92)Tom Christiebefore adoption56a7943

lines 38–39why, one step back
38>>> r
39<Response [200 OK]>

http3 (#86)Tom Christiebefore adoptionc9747aa

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

Int status codes (#92)Tom Christiebefore adoption56a7943

line 41why, one step back
41200

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

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

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 44–51why, one step back
44>>> r.headers['content-type']
45'text/html; charset=UTF-8'46>>> r.text47'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'48```4950## Features51

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

line 52why, one step back
52HTTPX builds on the well-established usability of `requests`, and gives you:

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 53–55why, one step back
53
54* A requests-compatible API.55* HTTP/2 and HTTP/1.1 support.

Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970

lines 56–58why, one step back
56* Support for [issuing HTTP requests in parallel](parallel.md). *(Coming soon)*
57* Standard synchronous interface, but [with `async`/`await` support if you need it](async.md).58* Ability to [make requests directly to WSGI or ASGI applications](advanced.md#calling-into-python-web-apps).

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 59–68why, one step back
59* Strict timeouts everywhere.
60* Fully type annotated.61* 100% test coverage.6263Plus all the standard features of `requests`...6465* International Domains and URLs66* Keep-Alive & Connection Pooling67* Sessions with Cookie Persistence68* Browser-style SSL Verification

Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970

line 69why, one step back
69* Basic/Digest Authentication *(Digest is still TODO)*

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 70–73why, one step back
70* Elegant Key/Value Cookies
71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response Bodies

Add multipart docsTom Christiebefore adoptiond21e3ab

line 74why, one step back
74* Multipart File Uploads

Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 76–77why, one step back
76* Connection Timeouts
77* Streaming Downloads

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 79–84why, one step back
79* Chunked Requests
8081## Documentation8283For a run-through of all the basics, head over to the [QuickStart](quickstart.md).84

Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970

lines 85–87why, one step back
85For more advanced topics, see the [Advanced Usage](advanced.md) section, or
86the specific topics on making [Parallel Requests](parallel.md) or using the87[Async Client](async.md).

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 88–92why, one step back
88
89The [Developer Interface](api.md) provides a comprehensive API reference.9091## Dependencies92

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 94–98why, one step back
94
95* `h2` - HTTP/2 support.96* `h11` - HTTP/1.1 support.97* `certifi` - SSL certificates.98* `chardet` - Fallback auto-detection for response encoding.

Merge pull request #315 from cansarigol/hstspreload-docTom Christiebefore adoption67d96b6

line 99why, one step back
99* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 100–105why, one step back
100* `idna` - Internationalized domain name support.
101* `rfc3986` - URL parsing & normalization.102* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*103104A huge amount of credit is due to `requests` for the API layout that105much 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 106why, one step back
106inspiration around the lower-level networking details.

Docs tweaksTom Christiebefore adoption60dca3d

lines 107–112why, one step back
107
108## Installation109110Install with pip:111112```shell

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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

Docs tweaksTom Christiebefore adoption60dca3d

lines 114–115why, one step back
114```
115

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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