Requests III: HTTP for Humans and Machines, alike.¶
Release v2.21.0. (Installation)
Requests III is an HTTP library for Python, built for Humans and Machines, alike. This repository is a work in progress, and the expected release timeline is “before PyCon 2020”.
Note
If you’re interested in financially supporting Requests 3 development, please make a donation.
If you’re on the job market, consider taking this programming quiz. A substantial donation will be made to this project, if you find a job through this platform.
Behold, the power of Requests III:
>>> from requests import HTTPSession
# Make a connection pool.
>>> http = HTTPSession()
# Make a request.
>>> r = http.request('get', 'https://httpbin.org/ip')
# View response data.
>>> r.json()
{'ip': '172.69.48.124'}
Requests III allows you to send organic, grass-fed HTTP/1.1 & HTTP/2 (wip) requests, without the need for manual thought-labor. There’s no need to add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, as well.
Besides, all the cool kids are doing it. Requests is one of the most downloaded Python packages of all time, pulling in over ~1.6 million installations per day!
User Testimonials¶
Microsoft, Google, Amazon, Salesforce, Heroku, DigitalOcean, RedHat, Twitter, Facebook, Instagram, Spotify, &c all use Requests to query internal HTTPS services.
- Armin Ronacher, creator of Flask—
- Requests is the perfect example how beautiful an API can be with the right level of abstraction.
- Matt DeBoard—
- I’m going to get Kenneth Reitz’s Python requests module tattooed on my body, somehow. The whole thing.
- Daniel Greenfeld—
- Nuked a 1200 LOC spaghetti code library with 10 lines of code thanks to Kenneth Reitz’s Requests library. Today has been AWESOME.
- Kenny Meyers—
- Python HTTP: When in doubt, or when not in doubt, use Requests. Beautiful, simple, Pythonic.
Requests is one of the most downloaded Python packages of all time, pulling in pulling in over ~1.6 million installations per day!. Join the party!
If your organization uses Requests internally, consider supporting the development of 3.0.
Feature Support¶
Requests III is ready for today’s web.
- Support for H11 & H2 protocols.
- Type-annotations for all public-facing APIs.
- Better defaults; required timeouts.
async
/await
keyword &asyncio
support.- Compability with Python 3.6+.
While retaining all the features of Requests Classic:
- Keep-Alive & Connection Pooling
- International Domains and URLs
- Sessions with Cookie Persistence
- Browser-style SSL Verification
- Automatic Content Decoding
- Basic/Digest Authentication
- Elegant Key/Value Cookies
- Automatic Decompression
- Unicode Response Bodies
- HTTP(S) Proxy Support
- Multipart File Uploads
- Streaming Downloads
- Connection Timeouts
- Chunked Requests
.netrc
Support
The User Guide¶
This part of the documentation, which is mostly prose, begins with some background information about Requests, then focuses on step-by-step instructions for getting the most out of Requests.
- Introduction
- Installation of Requests
- Quickstart
- Make a Request
- Passing Parameters In URLs
- Response Content
- Binary Response Content
- JSON Response Content
- Raw Response Content
- Custom Headers
- More complicated POST requests
- POST a Multipart-Encoded File
- Response Status Codes
- Response Headers
- Cookies
- Redirection and History
- Timeouts
- Errors and Exceptions
- Advanced Usage
- Session Objects
- Request and Response Objects
- Prepared Requests
- SSL Cert Verification
- Client Side Certificates
- CA Certificates
- Body Content Workflow
- Keep-Alive
- Streaming Uploads
- Chunk-Encoded Requests
- POST Multiple Multipart-Encoded Files
- Event Hooks
- Custom Authentication
- Streaming Requests
- Proxies
- Compliance
- HTTP Verbs
- Custom Verbs
- Link Headers
- Transport Adapters
- Blocking Or Non-Blocking?
- Header Ordering
- Timeouts
- Authentication
The Community Guide¶
This part of the documentation, which is mostly prose, details the Requests ecosystem and community.
- Community Sponsors
- Recommended Packages and Extensions
- Frequently Asked Questions
- Integrations
- Articles & Talks
- Support
- Vulnerability Disclosure
- Community Updates
- Release and Version History
- Release History
- dev
- 2.21.0 (2018-12-10)
- 2.20.1 (2018-11-08)
- 2.20.0 (2018-10-18)
- 2.19.1 (2018-06-14)
- 2.19.0 (2018-06-12)
- 2.18.4 (2017-08-15)
- 2.18.3 (2017-08-02)
- 2.18.2 (2017-07-25)
- 2.18.1 (2017-06-14)
- 2.18.0 (2017-06-14)
- 2.17.3 (2017-05-29)
- 2.17.2 (2017-05-29)
- 2.17.1 (2017-05-29)
- 2.17.0 (2017-05-29)
- 2.16.5 (2017-05-28)
- 2.16.4 (2017-05-27)
- 2.16.3 (2017-05-27)
- 2.16.2 (2017-05-27)
- 2.16.1 (2017-05-27)
- 2.16.0 (2017-05-26)
- 2.15.1 (2017-05-26)
- 2.15.0 (2017-05-26)
- 2.14.2 (2017-05-10)
- 2.14.1 (2017-05-09)
- 2.14.0 (2017-05-09)
- 2.13.0 (2017-01-24)
- 2.12.5 (2017-01-18)
- 2.12.4 (2016-12-14)
- 2.12.3 (2016-12-01)
- 2.12.2 (2016-11-30)
- 2.12.1 (2016-11-16)
- 2.12.0 (2016-11-15)
- 2.11.1 (2016-08-17)
- 2.11.0 (2016-08-08)
- 2.10.0 (2016-04-29)
- 2.9.2 (2016-04-29)
- 2.9.1 (2015-12-21)
- 2.9.0 (2015-12-15)
- 2.8.1 (2015-10-13)
- 2.8.0 (2015-10-05)
- 2.7.0 (2015-05-03)
- 2.6.2 (2015-04-23)
- 2.6.1 (2015-04-22)
- 2.6.0 (2015-03-14)
- 2.5.3 (2015-02-24)
- 2.5.2 (2015-02-23)
- 2.5.1 (2014-12-23)
- 2.5.0 (2014-12-01)
- 2.4.3 (2014-10-06)
- 2.4.2 (2014-10-05)
- 2.4.1 (2014-09-09)
- 2.4.0 (2014-08-29)
- 2.3.0 (2014-05-16)
- 2.2.1 (2014-01-23)
- 2.2.0 (2014-01-09)
- 2.1.0 (2013-12-05)
- 2.0.1 (2013-10-24)
- 2.0.0 (2013-09-24)
- 1.2.3 (2013-05-25)
- 1.2.2 (2013-05-23)
- 1.2.1 (2013-05-20)
- 1.2.0 (2013-03-31)
- 1.1.0 (2013-01-10)
- 1.0.3 (2012-12-18)
- 1.0.2 (2012-12-17)
- 1.0.1 (2012-12-17)
- 1.0.0 (2012-12-17)
- 0.14.2 (2012-10-27)
- 0.14.1 (2012-10-01)
- 0.14.0 (2012-09-02)
- 0.13.9 (2012-08-25)
- 0.13.8 (2012-08-21)
- 0.13.7 (2012-08-19)
- 0.13.6 (2012-08-06)
- 0.13.5 (2012-07-27)
- 0.13.4 (2012-07-27)
- 0.13.3 (2012-07-12)
- 0.13.2 (2012-06-28)
- 0.13.1 (2012-06-07)
- 0.13.0 (2012-05-29)
- 0.12.1 (2012-05-08)
- 0.12.0 (2012-05-02)
- 0.11.2 (2012-04-22)
- 0.11.1 (2012-03-30)
- 0.11.0 (2012-03-14)
- 0.10.8 (2012-03-09)
- 0.10.7 (2012-03-07)
- 0.10.6 (2012-02-25)
- 0.10.5 (2012-02-25)
- 0.10.4 (2012-02-20)
- 0.10.3 (2012-02-20)
- 0.10.2 (2012-01-15)
- 0.10.1 (2012-01-23)
- 0.10.0 (2012-01-21)
- 0.9.3 (2012-01-18)
- 0.9.2 (2012-01-18)
- 0.9.1 (2012-01-06)
- 0.9.0 (2011-12-28)
- 0.8.9 (2011-12-28)
- 0.8.8 (2011-12-28)
- 0.8.7 (2011-12-24)
- 0.8.6 (2011-12-18)
- 0.8.5 (2011-12-14)
- 0.8.4 (2011-12-11)
- 0.8.3 (2011-11-27)
- 0.8.2 (2011-11-19)
- 0.8.1 (2011-11-15)
- 0.8.0 (2011-11-13)
- 0.7.6 (2011-11-07)
- 0.7.5 (2011-11-04)
- 0.7.4 (2011-10-26)
- 0.7.3 (2011-10-23)
- 0.7.2 (2011-10-23)
- 0.7.1 (2011-10-23)
- 0.7.0 (2011-10-22)
- 0.6.6 (2011-10-19)
- 0.6.5 (2011-10-18)
- 0.6.4 (2011-10-13)
- 0.6.3 (2011-10-13)
- 0.6.2 (2011-10-09)
- 0.6.1 (2011-08-20)
- 0.6.0 (2011-08-17)
- 0.5.1 (2011-07-23)
- 0.5.0 (2011-06-21)
- 0.4.1 (2011-05-22)
- 0.4.0 (2011-05-15)
- 0.3.4 (2011-05-14)
- 0.3.3 (2011-05-12)
- 0.3.2 (2011-04-15)
- 0.3.1 (2011-04-01)
- 0.3.0 (2011-02-25)
- 0.2.4 (2011-02-19)
- 0.2.3 (2011-02-15)
- 0.2.2 (2011-02-14)
- 0.2.1 (2011-02-14)
- 0.2.0 (2011-02-14)
- 0.0.1 (2011-02-13)
- Release Process and Rules
The API Documentation / Guide¶
If you are looking for information on a specific function, class, or method, this part of the documentation is for you.
The Contributor Guide¶
If you want to contribute to the project, this part of the documentation is for you.
There are no more guides. You are now guideless. Good luck.