index.md
This file
Path
docs/index.md
100 lines · 2.7 KiB · Markdown
Last changed by
Int status codes (#92)Tom Christiebefore adoption56a7943
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–60why, 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.44* Support for issuing HTTP requests in parallel.45* Standard synchronous interface, but with `async`/`await` support if you need it.46* Strict timeouts everywhere.47* Fully type annotated.48* 100% test coverage.4950Plus all the standard features of `requests`...5152* International Domains and URLs53* Keep-Alive & Connection Pooling54* Sessions with Cookie Persistence55* Browser-style SSL Verification56* Basic/Digest Authentication *Digest is still TODO*57* Elegant Key/Value Cookies58* Automatic Decompression59* Automatic Content Decoding60* Unicode Response BodiesAdd multipart docsTom Christiebefore adoptiond21e3ab
line 61why, one step back61* Multipart File Uploadshttp3 (#86)Tom Christiebefore adoptionc9747aa
lines 62–90why, one step back62* HTTP(S) Proxy Support *TODO*63* Connection Timeouts64* Streaming Downloads65* .netrc Support *TODO*66* Chunked Requests6768## Documentation6970For a run-through of all the basics, head over to the [QuickStart](quickstart.md).7172For more advanced topics, see the [Parallel Requests](parallel.md) or [Async Client](async.md) documentation.7374The [Developer Interface](api.md) provides a comprehensive API reference.7576## Dependencies7778The HTTP3 project relies on these excellent libraries:7980* `h2` - HTTP/2 support.81* `h11` - HTTP/1.1 support.82* `certifi` - SSL certificates.83* `chardet` - Fallback auto-detection for response encoding.84* `idna` - Internationalized domain name support.85* `rfc3986` - URL parsing & normalization.86* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*8788A huge amount of credit is due to `requests` for the API layout that89much of this work follows, as well as to `urllib3` for plenty of design90inspiration around the lower level networking details.Docs tweaksTom Christiebefore adoption60dca3d
lines 91–100why, one step back9192## Installation9394Install with pip:9596```shell97$ pip install http398```99100HTTP3 requires Python 3.6+