Skip to content
Myr

index.md

This file

Path

docs/index.md

115 lines · 3.2 KiB · Markdown

Last changed by

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

History of this file

Take it

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

lines 1–3why, one step back
1<p align="center" style="margin: 0 0 10px">
2 <img width="350" height="208" src="http://127.0.0.1:8000/img/logo.jpg" alt='HTTPX'>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>

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 13–21why, one step back
13<a href="https://travis-ci.org/encode/http3">
14 <img src="https://travis-ci.org/encode/http3.svg?branch=master" alt="Build Status">15</a>16<a href="https://codecov.io/gh/encode/http3">17 <img src="https://codecov.io/gh/encode/http3/branch/master/graph/badge.svg" alt="Coverage">18</a>19<a href="https://pypi.org/project/http3/">20 <img src="https://badge.fury.io/py/http3.svg" alt="Package version">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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 42–51why, one step back
42>>> r.protocol
43'HTTP/2'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

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

line 78why, one step back
78* .netrc Support *(TODO)*

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–105why, 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.99* `idna` - Internationalized domain name support.100* `rfc3986` - URL parsing & normalization.101* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*102103A huge amount of credit is due to `requests` for the API layout that104much of this work follows, as well as to `urllib3` for plenty of design105inspiration around the lower level networking details.

Docs tweaksTom Christiebefore adoption60dca3d

lines 106–111why, one step back
106
107## Installation108109Install with pip:110111```shell

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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

Docs tweaksTom Christiebefore adoption60dca3d

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

Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b

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