Skip to content
Myr

README.md

This file

Path

README.md

133 lines · 4.5 KiB · Markdown

Last changed by

Update README.mdTom Christiebefore adoption85cc8f8

History of this file

Take it

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

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.

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

line 20why, one step back
20

Drop sync (#544)Tom Christiebefore adoption206c537

lines 21–23why, 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.23

Update README.mdTom Christiebefore adoption293bc70

lines 24–26why, one step back
24**Note**: *HTTPX should still be considered in alpha. We'd love early users and feedback,
25but would strongly recommend pinning your dependencies to the latest median26release, so that you're able to properly review API changes between package

Update README.mdTom Christiebefore adoption85cc8f8

line 27why, one step back
27updates. Currently you should be using `httpx==0.9.*`.*

Drop sync (#544)Tom Christiebefore adoption206c537

line 28why, one step back
28

Update README.mdTom Christiebefore adoption293bc70

lines 29–31why, one step back
29*In particular, the 0.8 release switched HTTPX into focusing exclusively on
30providing an async client, in order to move the project forward, and help31us [change our approach to providing sync+async support][sync-support]. If

Update README.mdTom Christiebefore adoptioncb735b9

line 32why, one step back
32you have been using the sync client, you may want to pin to `httpx==0.7.*`,

Update README.mdTom Christiebefore adoption293bc70

lines 33–34why, one step back
33and wait until our sync client is reintroduced.*
34

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 35–38why, one step back
35---
3637Let's get started...38

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 44–45why, one step back
44```python
45>>> import httpx

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 47–50why, one step back
47>>> r
48<Response [200 OK]>49>>> r.status_code50200

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

lines 51–52why, one step back
51>>> r.http_version
52'HTTP/1.1'

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 53–62why, one step back
53>>> r.headers['content-type']
54'text/html; charset=UTF-8'55>>> r.text56'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'57```5859## Features6061HTTPX builds on the well-established usability of `requests`, and gives you:62

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

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

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 66–75why, one step back
66* Strict timeouts everywhere.
67* Fully type annotated.68* 100% test coverage.6970Plus all the standard features of `requests`...7172* International Domains and URLs73* Keep-Alive & Connection Pooling74* Sessions with Cookie Persistence75* Browser-style SSL Verification

Document digest auth (#348)Yeray Diaz Diazbefore adoption8155352

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 77–81why, one step back
77* Elegant Key/Value Cookies
78* Automatic Decompression79* Automatic Content Decoding80* Unicode Response Bodies81* Multipart File Uploads

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 83–84why, one step back
83* Connection Timeouts
84* Streaming Downloads

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

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 86–103why, one step back
86* Chunked Requests
8788## Installation8990Install with pip:9192```shell93$ pip install httpx94```9596httpx requires Python 3.6+9798## Documentation99100Project documentation is available at [www.encode.io/httpx/](https://www.encode.io/httpx/).101102For a run-through of all the basics, head over to the [QuickStart](https://www.encode.io/httpx/quickstart/).103

Drop sync (#544)Tom Christiebefore adoption206c537

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 105–119why, one step back
105
106The [Developer Interface](https://www.encode.io/httpx/api/) provides a comprehensive API reference.107108## Contribute109110If you want to contribute with HTTPX check out the [Contributing Guide](https://www.encode.io/httpx/contributing/) to learn how to start.111112## Dependencies113114The httpx project relies on these excellent libraries:115116* `h2` - HTTP/2 support.117* `h11` - HTTP/1.1 support.118* `certifi` - SSL certificates.119* `chardet` - Fallback auto-detection for response encoding.

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

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 121–122why, one step back
121* `idna` - Internationalized domain name support.
122* `rfc3986` - URL parsing & normalization.

Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731

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

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

lines 124–127why, one step back
124* `brotlipy` - Decoding for "brotli" compressed responses. *(Optional)*
125126A huge amount of credit is due to `requests` for the API layout that127much 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 128why, one step back
128inspiration around the lower-level networking details.

Use chained comparison in status codes for error and successSaugat Pachhaibefore adoption23f11aa

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

Update README.mdTom Christiebefore adoption293bc70

lines 132–133why, one step back
132
133[sync-support]: https://github.com/encode/httpx/issues/572