Requests (software)
Original author(s) | Kenneth Reitz |
---|---|
Developer(s) | Cory Benfield, Ian Stapleton Cordasco, Nate Prewitt |
Initial release | Error: df must be either "yes" or "y" (help) |
Stable release | 2.32.3[1] ![]() |
Repository | github |
Written in | Python |
License | Apache License 2.0 |
Website | requests |
Requests is an HTTP client library for the Python programming language.[2][3]
Requests is one of the most downloaded Python libraries,[2] with over 300 million monthly downloads.[4] It maps the HTTP protocol onto Python's object-oriented semantics. Requests's design has inspired and been copied by HTTP client libraries for other programming languages.[5][6][7][8] It is implemented as a wrapper for urllib3, another third-party Python HTTP library.
Kenneth Reitz, the original author, handed control over to the Python Software Foundation in 2019.[9]
Features
Requests supports TLS/SSL verification, cookies, compression, SOCKS, timeouts, a variety of request methods, and custom headers[2][10].
Alternatives
Urrllib and httplib are alternatives to the requests library, although requests maintains popularity on account of providing a more convenient higher level API. For example, to send a POST request with urllib, you need to encode your data as bytes and create a urllib.request. Request object. Meanwhile, httplib is even lower level, and doesn't automatically handle redirects or cookies. Although these lower level libraries can be more flexible, this approach can also make them more difficult to use[11].
References
- ^ "Release 2.32.3". 29 May 2024. Retrieved 24 June 2024.
- ^ a b c Project homepage
- ^ Beazly, David (April 2012). "R is for replacement" (PDF). Login. 37 (2). Retrieved 16 May 2020.
- ^ "requests download stats". PePy. Retrieved 2023-11-08.
- ^ "Requests for PHP | Requests for PHP". requests.ryanmccue.info. Retrieved 2023-06-07.
- ^ "Tools for Working with URLs and HTTP". httr.r-lib.org. Retrieved 2023-06-07.
- ^ Duan, Daniel (2023-06-03), Just, retrieved 2023-06-07
- ^ httprb/http, http.rb, 2023-06-06, retrieved 2023-06-07
- ^ "Project maintainence · Issue #5149 · psf/requests". GitHub. Retrieved 2023-06-07.
- ^ Python, Real. "Python's Requests Library (Guide) – Real Python". realpython.com. Retrieved 2023-11-08.
- ^ "Python Requests Module". ioflood.com. Retrieved 2023-12-08.