Skip to content
Myr

index.md

This file

Path

docs/index.md

98 lines · 2.7 KiB · Markdown

Last changed by

'For Python 3'Tom Christiebefore adoptionf296e6d

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–88why, 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/')26>>> r.status_code27<StatusCode.OK: 200>28>>> r.protocol29'HTTP/2'30>>> r.headers['content-type']31'text/html; charset=UTF-8'32>>> r.text33'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'34```3536## Features3738HTTP3 builds on the well-established usability of `requests`, and gives you:3940* A requests-compatible API.41* HTTP/2 and HTTP/1.1 support.42* Support for issuing HTTP requests in parallel.43* Standard synchronous interface, but with `async`/`await` support if you need it.44* Strict timeouts everywhere.45* Fully type annotated.46* 100% test coverage.4748Plus all the standard features of `requests`...4950* International Domains and URLs51* Keep-Alive & Connection Pooling52* Sessions with Cookie Persistence53* Browser-style SSL Verification54* Basic/Digest Authentication *Digest is still TODO*55* Elegant Key/Value Cookies56* Automatic Decompression57* Automatic Content Decoding58* Unicode Response Bodies59* Multipart File Uploads *TODO*60* HTTP(S) Proxy Support *TODO*61* Connection Timeouts62* Streaming Downloads63* .netrc Support *TODO*64* Chunked Requests6566## Documentation6768For a run-through of all the basics, head over to the [QuickStart](quickstart.md).6970For more advanced topics, see the [Parallel Requests](parallel.md) or [Async Client](async.md) documentation.7172The [Developer Interface](api.md) provides a comprehensive API reference.7374## Dependencies7576The HTTP3 project relies on these excellent libraries:7778* `h2` - HTTP/2 support.79* `h11` - HTTP/1.1 support.80* `certifi` - SSL certificates.81* `chardet` - Fallback auto-detection for response encoding.82* `idna` - Internationalized domain name support.83* `rfc3986` - URL parsing & normalization.84* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*8586A huge amount of credit is due to `requests` for the API layout that87much of this work follows, as well as to `urllib3` for plenty of design88inspiration around the lower level networking details.

Docs tweaksTom Christiebefore adoption60dca3d

lines 89–98why, one step back
89
90## Installation9192Install with pip:9394```shell95$ pip install http396```9798HTTP3 requires Python 3.6+