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 fileTake it
Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 1–3why, one step back1<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 back4Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 5–12why, one step back5<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 back13<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 back22</p>http3 (#86)Tom Christiebefore adoptionc9747aa
line 23why, one step back23Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 24–25why, one step back24<em>A next-generation HTTP client for Python.</em>25</div>http3 (#86)Tom Christiebefore adoptionc9747aa
lines 26–35why, one step back2627!!! 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```pythonRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
lines 36–37why, one step back36>>> import httpx37>>> r = httpx.get('https://www.example.org/')Int status codes (#92)Tom Christiebefore adoption56a7943
lines 38–39why, one step back38>>> r39<Response [200 OK]>http3 (#86)Tom Christiebefore adoptionc9747aa
line 40why, one step back40>>> r.status_codeInt status codes (#92)Tom Christiebefore adoption56a7943
line 41why, one step back41200http3 (#86)Tom Christiebefore adoptionc9747aa
lines 42–51why, one step back42>>> r.protocol43'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## Features51Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 52why, one step back52HTTPX builds on the well-established usability of `requests`, and gives you:http3 (#86)Tom Christiebefore adoptionc9747aa
lines 53–55why, one step back5354* 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 back56* 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 back59* 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 VerificationSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 69why, one step back69* Basic/Digest Authentication *(Digest is still TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 70–73why, one step back70* Elegant Key/Value Cookies71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response BodiesAdd multipart docsTom Christiebefore adoptiond21e3ab
line 74why, one step back74* Multipart File UploadsSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 75why, one step back75* HTTP(S) Proxy Support *(TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 76–77why, one step back76* Connection Timeouts77* Streaming DownloadsSupport WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
line 78why, one step back78* .netrc Support *(TODO)*http3 (#86)Tom Christiebefore adoptionc9747aa
lines 79–84why, one step back79* Chunked Requests8081## Documentation8283For a run-through of all the basics, head over to the [QuickStart](quickstart.md).84Support WSGI and ASGI apps. (#94)Tom Christiebefore adoptionbb86970
lines 85–87why, one step back85For more advanced topics, see the [Advanced Usage](advanced.md) section, or86the 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 back8889The [Developer Interface](api.md) provides a comprehensive API reference.9091## Dependencies92Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 93why, one step back93The HTTPX project relies on these excellent libraries:http3 (#86)Tom Christiebefore adoptionc9747aa
lines 94–105why, one step back9495* `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 back106107## Installation108109Install with pip:110111```shellRenaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 112why, one step back112$ pip install httpxDocs tweaksTom Christiebefore adoption60dca3d
lines 113–114why, one step back113```114Renaming -> httpx (#129)Tom Christiebefore adoption2d09d5b
line 115why, one step back115HTTPX requires Python 3.6+