Skip to content
Myr

README.md

This file

Path

README.md

123 lines · 3.9 KiB · Markdown

Last changed by

Drop sync (#544)Tom Christiebefore adoption206c537

History of this file

Take it

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

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 1–18why, one step back
1<p align="center">
2 <a href="https://www.encode.io/httpx/"><img width="350" height="208" src="https://raw.githubusercontent.com/encode/httpx/master/docs/img/logo.jpg" alt='HTTPX'></a>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

Drop sync (#544)Tom Christiebefore adoption206c537

line 19why, one step back
19HTTPX is an asynchronous HTTP client, that supports HTTP/2 and HTTP/1.1.

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

line 20why, one step back
20

Drop sync (#544)Tom Christiebefore adoption206c537

lines 21–27why, one step back
21It can be used in high-performance async web frameworks, using either asyncio
22or trio, and is able to support making large numbers of requests concurrently.2324**Note**: *The 0.8 release switched HTTPX into focusing exclusively on the async25client. It is possible that we'll look at re-introducing a sync API at a26later date.*27

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 28–31why, one step back
28---
2930Let's get started...31

Drop sync (#544)Tom Christiebefore adoption206c537

lines 32–36why, one step back
32*The standard Python REPL does not allow top-level async statements.*
3334*To run async examples directly you'll probably want to either use `ipython`,35or use Python 3.8 with `python -m asyncio`.*36

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 37–38why, one step back
37```python
38>>> import httpx

Drop sync (#544)Tom Christiebefore adoption206c537

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

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 40–43why, one step back
40>>> r
41<Response [200 OK]>42>>> r.status_code43200

Force HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6

lines 44–45why, one step back
44>>> r.http_version
45'HTTP/1.1'

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 46–55why, one step back
46>>> r.headers['content-type']
47'text/html; charset=UTF-8'48>>> r.text49'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'50```5152## Features5354HTTPX builds on the well-established usability of `requests`, and gives you:55

Drop sync (#544)Tom Christiebefore adoption206c537

line 56why, one step back
56* A requests-compatible API wherever possible.

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

line 57why, one step back
57* HTTP/2 and HTTP/1.1 support.

Drop sync (#544)Tom Christiebefore adoption206c537

line 58why, one step back
58* Ability to [make requests directly to ASGI applications](https://www.encode.io/httpx/advanced/#calling-into-python-web-apps).

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 59–68why, one step back
59* 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 Verification

Document digest auth (#348)Yeray Diaz Diazbefore adoption8155352

line 69why, one step back
69* Basic/Digest Authentication

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 70–74why, one step back
70* Elegant Key/Value Cookies
71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response Bodies74* Multipart File Uploads

Drop sync (#544)Tom Christiebefore adoption206c537

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

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 76–77why, one step back
76* Connection Timeouts
77* Streaming Downloads

Documented netrc support (#225)Can Sarıgölbefore adoption21939fd

line 78why, one step back
78* .netrc Support

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 79–96why, one step back
79* Chunked Requests
8081## Installation8283Install with pip:8485```shell86$ pip install httpx87```8889httpx requires Python 3.6+9091## Documentation9293Project documentation is available at [www.encode.io/httpx/](https://www.encode.io/httpx/).9495For a run-through of all the basics, head over to the [QuickStart](https://www.encode.io/httpx/quickstart/).96

Drop sync (#544)Tom Christiebefore adoption206c537

line 97why, one step back
97For more advanced topics, see the [Advanced Usage](https://www.encode.io/httpx/advanced/) section.

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 98–100why, one step back
98
99The [Developer Interface](https://www.encode.io/httpx/api/) provides a comprehensive API reference.100

Add additional info to Contributing Guide (#213)Humberto Rochabefore adoption7156c36

lines 101–104why, one step back
101## Contribute
102103If you want to contribute with HTTPX check out the [Contributing Guide](https://www.encode.io/httpx/contributing/) to learn how to start.104

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 105–112why, one step back
105## Dependencies
106107The httpx project relies on these excellent libraries:108109* `h2` - HTTP/2 support.110* `h11` - HTTP/1.1 support.111* `certifi` - SSL certificates.112* `chardet` - Fallback auto-detection for response encoding.

Merge pull request #315 from cansarigol/hstspreload-docTom Christiebefore adoption67d96b6

line 113why, one step back
113* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 114–119why, one step back
114* `idna` - Internationalized domain name support.
115* `rfc3986` - URL parsing & normalization.116* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*117118A huge amount of credit is due to `requests` for the API layout that119much of this work follows, as well as to `urllib3` for plenty of design

Fix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5

line 120why, one step back
120inspiration around the lower-level networking details.

Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd

lines 121–123why, one step back
121
122<p align="center">&mdash; ⭐️ &mdash;</p>123<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>