README.md
This file
Path
README.md
133 lines · 4.5 KiB · Markdown
Last changed by
Update README.mdTom Christiebefore adoption293bc70
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–23why, 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.23Update README.mdTom Christiebefore adoption293bc70
lines 24–27why, one step back24**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 package27updates. Currently you should be using `http==0.8.*`.*Drop sync (#544)Tom Christiebefore adoption206c537
line 28why, one step back28Update README.mdTom Christiebefore adoption293bc70
lines 29–34why, one step back29*In particular, the 0.8 release switched HTTPX into focusing exclusively on30providing an async client, in order to move the project forward, and help31us [change our approach to providing sync+async support][sync-support]. If32you have been using the sync client, you may want to pin to `http==0.7.*`,33and wait until our sync client is reintroduced.*34Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 35–38why, one step back35---3637Let's get started...38Drop sync (#544)Tom Christiebefore adoption206c537
lines 39–43why, one step back39*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`.*43Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 44–45why, one step back44```python45>>> import httpxDrop sync (#544)Tom Christiebefore adoption206c537
line 46why, one step back46>>> r = await httpx.get('https://www.example.org/')Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 47–50why, one step back47>>> r48<Response [200 OK]>49>>> r.status_code50200Force HTTP/1.1 on short-lived connections (#284)Seth Michael Larsonbefore adoptione7aa6d6
lines 51–52why, one step back51>>> r.http_version52'HTTP/1.1'Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 53–62why, one step back53>>> 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:62Drop sync (#544)Tom Christiebefore adoption206c537
line 63why, one step back63* A requests-compatible API wherever possible.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
line 64why, one step back64* HTTP/2 and HTTP/1.1 support.Drop sync (#544)Tom Christiebefore adoption206c537
line 65why, one step back65* 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 66–75why, one step back66* 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 VerificationDocument digest auth (#348)Yeray Diaz Diazbefore adoption8155352
line 76why, one step back76* Basic/Digest AuthenticationRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 77–81why, one step back77* Elegant Key/Value Cookies78* Automatic Decompression79* Automatic Content Decoding80* Unicode Response Bodies81* Multipart File UploadsDrop sync (#544)Tom Christiebefore adoption206c537
line 82why, one step back82* HTTP(S) Proxy SupportRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 83–84why, one step back83* Connection Timeouts84* Streaming DownloadsDocumented netrc support (#225)Can Sarıgölbefore adoption21939fd
line 85why, one step back85* .netrc SupportRemoved deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 86–103why, one step back86* Chunked Requests8788## 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/).103Drop sync (#544)Tom Christiebefore adoption206c537
line 104why, one step back104For more advanced topics, see the [Advanced Usage](https://www.encode.io/httpx/advanced/) section.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 105–107why, one step back105106The [Developer Interface](https://www.encode.io/httpx/api/) provides a comprehensive API reference.107Add additional info to Contributing Guide (#213)Humberto Rochabefore adoption7156c36
lines 108–111why, one step back108## Contribute109110If you want to contribute with HTTPX check out the [Contributing Guide](https://www.encode.io/httpx/contributing/) to learn how to start.111Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 112–119why, one step back112## 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 back120* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 121–122why, one step back121* `idna` - Internationalized domain name support.122* `rfc3986` - URL parsing & normalization.Concurrency autodetection (#585)Tom Christiebefore adoption3cbe731
line 123why, one step back123* `sniffio` - Async library autodetection.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 124–127why, one step back124* `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 designFix typos, spelling issues, and grammar in docs (#426)Kyle Galbraithbefore adoptionb65bce5
line 128why, one step back128inspiration around the lower-level networking details.Removed deprecated TLS versions (#155)halbowbefore adoptionf974ebd
lines 129–131why, one step back129130<p align="center">— ⭐️ —</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 back132133[sync-support]: https://github.com/encode/httpx/issues/572