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 fileTake 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 back1<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>18Drop sync (#544)Tom Christiebefore adoption206c537
line 19why, one step back19HTTPX is an asynchronous HTTP client, that supports HTTP/2 and HTTP/1.1.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
line 20why, one step back20Drop sync (#544)Tom Christiebefore adoption206c537
lines 21–27why, one step back21It can be used in high-performance async web frameworks, using either asyncio22or 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.*27Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 28–31why, one step back28---2930Let's get started...31Drop sync (#544)Tom Christiebefore adoption206c537
lines 32–36why, one step back32*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`.*36Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 37–38why, one step back37```python38>>> import httpxDrop sync (#544)Tom Christiebefore adoption206c537
line 39why, one step back39>>> r = await httpx.get('https://www.example.org/')Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 40–43why, one step back40>>> r41<Response [200 OK]>42>>> r.status_code43200Force HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6
lines 44–45why, one step back44>>> r.http_version45'HTTP/1.1'Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 46–55why, one step back46>>> 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:55Drop sync (#544)Tom Christiebefore adoption206c537
line 56why, one step back56* A requests-compatible API wherever possible.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
line 57why, one step back57* HTTP/2 and HTTP/1.1 support.Drop sync (#544)Tom Christiebefore adoption206c537
line 58why, one step back58* 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 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 VerificationDocument digest auth (#348)Yeray Diaz Diazbefore adoption8155352
line 69why, one step back69* Basic/Digest AuthenticationRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 70–74why, one step back70* Elegant Key/Value Cookies71* Automatic Decompression72* Automatic Content Decoding73* Unicode Response Bodies74* Multipart File UploadsDrop sync (#544)Tom Christiebefore adoption206c537
line 75why, one step back75* HTTP(S) Proxy SupportRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 76–77why, one step back76* Connection Timeouts77* Streaming DownloadsDocumented netrc support (#225)Can Sarıgölbefore adoption21939fd
line 78why, one step back78* .netrc SupportRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 79–96why, one step back79* Chunked Requests8081## 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/).96Drop sync (#544)Tom Christiebefore adoption206c537
line 97why, one step back97For 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 back9899The [Developer Interface](https://www.encode.io/httpx/api/) provides a comprehensive API reference.100Add additional info to Contributing Guide (#213)Humberto Rochabefore adoption7156c36
lines 101–104why, one step back101## Contribute102103If you want to contribute with HTTPX check out the [Contributing Guide](https://www.encode.io/httpx/contributing/) to learn how to start.104Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 105–112why, one step back105## Dependencies106107The 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 back113* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 114–119why, one step back114* `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 designFix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5
line 120why, one step back120inspiration around the lower-level networking details.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 121–123why, one step back121122<p align="center">— ⭐️ —</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>