Skip to content
Myr

index.md

This file

Path

docs/index.md

103 lines · 2.9 KiB · Markdown

Last changed by

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

History of this file

Take it

Docs tweaksTom Christiebefore adoption60dca3d

line 1why, one step back
1<h1 style="margin: 0">HTTP3</h1>

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 2–12why, one step back
2
3<a href="https://travis-ci.org/encode/http3">4 <img src="https://travis-ci.org/encode/http3.svg?branch=master" alt="Build Status">5</a>6<a href="https://codecov.io/gh/encode/http3">7 <img src="https://codecov.io/gh/encode/http3/branch/master/graph/badge.svg" alt="Coverage">8</a>9<a href="https://pypi.org/project/http3/">10 <img src="https://badge.fury.io/py/http3.svg" alt="Package version">11</a>12

'For Python 3'Tom Christiebefore adoptionf296e6d

line 13why, one step back
13HTTP3 is a next-generation HTTP client for Python 3.

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 14–25why, one step back
14
15!!! warning16 This project should be considered as an "alpha" release. It is substantially17 API complete, but there are still some areas that need more work.1819---2021Let's get started...2223```python24>>> import http325>>> r = http3.get('https://www.example.org/')

Int status codes (#92)Tom Christiebefore adoption56a7943

lines 26–27why, one step back
26>>> r
27<Response [200 OK]>

http3 (#86)Tom Christiebefore adoptionc9747aa

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

Int status codes (#92)Tom Christiebefore adoption56a7943

line 29why, one step back
29200

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 30–43why, one step back
30>>> r.protocol
31'HTTP/2'32>>> r.headers['content-type']33'text/html; charset=UTF-8'34>>> r.text35'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'36```3738## Features3940HTTP3 builds on the well-established usability of `requests`, and gives you:4142* A requests-compatible API.43* HTTP/2 and HTTP/1.1 support.

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 47–56why, one step back
47* Strict timeouts everywhere.
48* Fully type annotated.49* 100% test coverage.5051Plus all the standard features of `requests`...5253* International Domains and URLs54* Keep-Alive & Connection Pooling55* Sessions with Cookie Persistence56* Browser-style SSL Verification

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 58–61why, one step back
58* Elegant Key/Value Cookies
59* Automatic Decompression60* Automatic Content Decoding61* Unicode Response Bodies

Add multipart docsTom Christiebefore adoptiond21e3ab

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

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 64–65why, one step back
64* Connection Timeouts
65* Streaming Downloads

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 67–72why, one step back
67* Chunked Requests
6869## Documentation7071For a run-through of all the basics, head over to the [QuickStart](quickstart.md).72

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

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

http3 (#86)Tom Christiebefore adoptionc9747aa

lines 76–93why, one step back
76
77The [Developer Interface](api.md) provides a comprehensive API reference.7879## Dependencies8081The HTTP3 project relies on these excellent libraries:8283* `h2` - HTTP/2 support.84* `h11` - HTTP/1.1 support.85* `certifi` - SSL certificates.86* `chardet` - Fallback auto-detection for response encoding.87* `idna` - Internationalized domain name support.88* `rfc3986` - URL parsing & normalization.89* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*9091A huge amount of credit is due to `requests` for the API layout that92much of this work follows, as well as to `urllib3` for plenty of design93inspiration around the lower level networking details.

Docs tweaksTom Christiebefore adoption60dca3d

lines 94–103why, one step back
94
95## Installation9697Install with pip:9899```shell100$ pip install http3101```102103HTTP3 requires Python 3.6+