README.md
This file
Path
README.md
133 lines · 4.5 KiB · Markdown
Last changed by
Version 0.10.0 (#691)Tom Christiebefore adoption35b7516
History of this fileTake it
The walk stopped after 200 commits: lines older than cadb9a4 point at it.
Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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.Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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–26why, 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 packageVersion 0.10.0 (#691)Tom Christiebefore adoption35b7516
line 27why, one step back27updates. Currently you should be using `httpx==0.10.*`.*Drop sync (#544)Tom Christiebefore adoption206c537
line 28why, one step back28Update README.mdTom Christiebefore adoption293bc70
lines 29–31why, 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]. IfUpdate README.mdTom Christiebefore adoptioncb735b9
line 32why, one step back32you 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 back33and wait until our sync client is reintroduced.*34Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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`.*43Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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/')Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
lines 47–62why, one step back47>>> r48<Response [200 OK]>49>>> r.status_code5020051>>> r.http_version52'HTTP/1.1'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:62Drop sync (#544)Tom Christiebefore adoption206c537
line 63why, one step back63* A requests-compatible API wherever possible.Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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).Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
lines 66–81why, 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 Verification76* Basic/Digest Authentication77* 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 SupportFix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
lines 83–103why, one step back83* Connection Timeouts84* Streaming Downloads85* .netrc Support86* 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.Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
lines 105–122why, one step back105106The [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.120* `hstspreload` - determines whether IDNA-encoded host should be only accessed via HTTPS.121* `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.Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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.Fix bug when using client without timeouts in Python 3.6 (#383)Florimond Mancabefore adoptioncadb9a4
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