Skip to content
Myr

README.md

This file

Path

README.md

128 lines · 4.6 KiB · Markdown

Last changed by

Version 0.12 (#852)Tom Christiebefore adoption6e40c1b

History of this file

Take it

The walk stopped after 200 commits: lines older than 09db6ec point at it.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 1why, one step back
1<p align="center">

Use www.python-httpx.org domainTom Christiebefore adoption367bff6

line 2why, one step back
2 <a href="https://www.python-httpx.org/"><img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'></a>

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 3–18why, one step back
3</p>
45<p align="center"><strong>HTTPX</strong> <em>- A next-generation HTTP client for Python.</em></p>67<p align="center">8<a href="https://travis-ci.org/encode/httpx">9 <img src="https://travis-ci.org/encode/httpx.svg?branch=master" alt="Build Status">10</a>11<a href="https://codecov.io/gh/encode/httpx">12 <img src="https://codecov.io/gh/encode/httpx/branch/master/graph/badge.svg" alt="Coverage">13</a>14<a href="https://pypi.org/project/httpx/">15 <img src="https://badge.fury.io/py/httpx.svg" alt="Package version">16</a>17</p>18

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 19why, one step back
19HTTPX is a fully featured HTTP client for Python 3, which provides sync and async APIs, and support for both HTTP/1.1 and HTTP/2.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 20why, one step back
20

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 21why, one step back
21**Note**: _HTTPX should be considered in beta. We believe we've got the public API to

Version 0.12 (#852)Tom Christiebefore adoption6e40c1b

line 22why, one step back
22a stable point now, but would strongly recommend pinning your dependencies to the `0.12.*`

Link to changelogTom Christiebefore adoption97807bf

line 23why, one step back
23release, so that you're able to properly review [API changes between package updates](https://github.com/encode/httpx/blob/master/CHANGELOG.md). A 1.0 release is expected to be issued sometime on or before April 2020._

Drop sync (#544)Tom Christiebefore adoption206c537

line 24why, one step back
24

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 25–30why, one step back
25---
2627Let's get started...2829```python30>>> import httpx

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 31why, one step back
31>>> r = httpx.get('https://www.example.org/')

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 32–41why, one step back
32>>> r
33<Response [200 OK]>34>>> r.status_code3520036>>> r.headers['content-type']37'text/html; charset=UTF-8'38>>> r.text39'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'40```41

Add an async example to intro snippets (#750)Florimond Mancabefore adoption7d84408

lines 42–53why, one step back
42Or, using the async API...
4344_Use [IPython](https://ipython.readthedocs.io/en/stable/) or Python 3.8+ with `python -m asyncio` to try this code interactively._4546```python47>>> import httpx48>>> async with httpx.AsyncClient() as client:49>>> r = await client.get('https://www.example.org/')50>>> r51<Response [200 OK]>52```53

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 54–57why, one step back
54## Features
5556HTTPX builds on the well-established usability of `requests`, and gives you:57

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

lines 58–61why, one step back
58* A broadly [requests-compatible API](https://www.python-httpx.org/compatibility/).
59* Standard synchronous interface, but with [async support if you need it](https://www.python-httpx.org/async/).60* HTTP/1.1 [and HTTP/2 support](https://www.python-httpx.org/http2/).61* Ability to make requests directly to [WSGI applications](https://www.python-httpx.org/advanced/#calling-into-python-web-apps) or [ASGI applications](https://www.python-httpx.org/async/#calling-into-python-web-apps).

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 62–63why, one step back
62* Strict timeouts everywhere.
63* Fully type annotated.

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 64why, one step back
64* 99% test coverage.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 65–77why, one step back
65
66Plus all the standard features of `requests`...6768* International Domains and URLs69* Keep-Alive & Connection Pooling70* Sessions with Cookie Persistence71* Browser-style SSL Verification72* Basic/Digest Authentication73* Elegant Key/Value Cookies74* Automatic Decompression75* Automatic Content Decoding76* Unicode Response Bodies77* Multipart File Uploads

Drop sync (#544)Tom Christiebefore adoption206c537

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

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 79–95why, one step back
79* Connection Timeouts
80* Streaming Downloads81* .netrc Support82* Chunked Requests8384## Installation8586Install with pip:8788```shell89$ pip install httpx90```9192httpx requires Python 3.6+9394## Documentation95

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

line 96why, one step back
96Project documentation is available at [https://www.python-httpx.org/](https://www.python-httpx.org/).

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 97why, one step back
97

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

line 98why, one step back
98For a run-through of all the basics, head over to the [QuickStart](https://www.python-httpx.org/quickstart/).

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 99why, one step back
99

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

line 100why, one step back
100For more advanced topics, see the [Advanced Usage](https://www.python-httpx.org/advanced/) section, the [async support](https://www.python-httpx.org/async/) section, or the [HTTP/2](https://www.python-httpx.org/http2/) section.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 101why, one step back
101

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

line 102why, one step back
102The [Developer Interface](https://www.python-httpx.org/api/) provides a comprehensive API reference.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 103–105why, one step back
103
104## Contribute105

Use www.python-httpx.org domainTom Christiebefore adoptionb932d94

line 106why, one step back
106If you want to contribute with HTTPX check out the [Contributing Guide](https://www.python-httpx.org/contributing/) to learn how to start.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 107–111why, one step back
107
108## Dependencies109110The httpx project relies on these excellent libraries:111

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 112why, one step back
112* `urllib3` - Sync client support.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

line 113why, one step back
113* `h11` - HTTP/1.1 support.

Proposed 0.11 docs (#727)Tom Christiebefore adoption2038919

line 114why, one step back
114* `h2` - HTTP/2 support.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 115–119why, one step back
115* `certifi` - SSL certificates.
116* `chardet` - Fallback auto-detection for response encoding.117* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.118* `idna` - Internationalized domain name support.119* `rfc3986` - URL parsing & normalization.

Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731

line 120why, one step back
120* `sniffio` - Async library autodetection.

Drop proxies parameter from the high level API (#485)Yeray Diaz Diazbefore adoption09db6ec

lines 121–128why, one step back
121* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*
122123A huge amount of credit is due to `requests` for the API layout that124much of this work follows, as well as to `urllib3` for plenty of design125inspiration around the lower-level networking details.126127<p align="center">&mdash; ⭐️ &mdash;</p>128<p align="center"><i>HTTPX is <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD licensed</a> code. Designed & built in Brighton, England.</i></p>