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 fileTake it
Docs tweaksTom Christiebefore adoption60dca3d
line 1why, one step back1<h1 style="margin: 0">HTTP3</h1>http3 (#86)Tom Christiebefore adoptionc9747aa
lines 2–12why, one step back23<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 back13HTTP3 is a next-generation HTTP client for Python 3.http3 (#86)Tom Christiebefore adoptionc9747aa
lines 14–25why, one step back1415!!! 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 back26>>> r27<Response [200 OK]>http3 (#86)Tom Christiebefore adoptionc9747aa
line 28why, one step back28>>> r.status_codeInt status codes (#92)Tom Christiebefore adoption56a7943
line 29why, one step back29200http3 (#86)Tom Christiebefore adoptionc9747aa
lines 30–43why, one step back30>>> r.protocol31'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 back44* 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 back47* 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 VerificationSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 57why, one step back57* Basic/Digest Authentication *(Digest is still TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 58–61why, one step back58* Elegant Key/Value Cookies59* Automatic Decompression60* Automatic Content Decoding61* Unicode Response BodiesAdd multipart docsTom Christiebefore adoptiond21e3ab
line 62why, one step back62* Multipart File UploadsSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 63why, one step back63* HTTP(S) Proxy Support *(TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 64–65why, one step back64* Connection Timeouts65* Streaming DownloadsSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 66why, one step back66* .netrc Support *(TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 67–72why, one step back67* Chunked Requests6869## Documentation7071For a run-through of all the basics, head over to the [QuickStart](quickstart.md).72Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
lines 73–75why, one step back73For more advanced topics, see the [Advanced Usage](advanced.md) section, or74the 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 back7677The [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 back9495## Installation9697Install with pip:9899```shell100$ pip install http3101```102103HTTP3 requires Python 3.6+