mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 22:50:17 +00:00
37 lines
3.0 KiB
Markdown
37 lines
3.0 KiB
Markdown
# Requests: HTTP for Humans
|
|
|
|
The Requests library is a popular HTTP library for Python.<label for="sn-requests" class="margin-toggle sidenote-number"></label>
|
|
<input type="checkbox" id="sn-requests" class="margin-toggle"/>
|
|
<span class="sidenote">The philosophy behind Requests emerged from frustration with urllib2's complexity. Kenneth famously said "HTTP libraries should be for humans, not machines," leading to the creation of an API that prioritizes developer experience.</span> It provides a simple and intuitive interface for making HTTP requests, making it easy to interact with web services and APIs.
|
|
|
|
$ uv pip install requests
|
|
|
|
This project is downloaded over 20 million times a day,<label for="sn-downloads" class="margin-toggle sidenote-number"></label>
|
|
<input type="checkbox" id="sn-downloads" class="margin-toggle"/>
|
|
<span class="sidenote">This adoption rate places Requests among the most popular Python packages ever created, reflecting how it became the de facto standard for HTTP operations in Python.</span> and is widely used in the Python community. It is known for its ease of use and powerful features, making it a go-to choice for developers who need to work with HTTP in their Python projects.
|
|
|
|
**Fun fact**: the logo of the Requests project is a [tattoo](/photos/experiments/Tattoos) that I have on my right arm.<label for="sn-tattoo" class="margin-toggle sidenote-number"></label>
|
|
<input type="checkbox" id="sn-tattoo" class="margin-toggle"/>
|
|
<span class="sidenote">Getting a tattoo of your own open source project is rare in the programming world, symbolizing how Requests became more than just code—it became part of Kenneth's identity as a developer.</span>
|
|
|
|
## Resources
|
|
|
|
- [Requests Documentation](https://docs.python-requests.org/en/master/)
|
|
- [HTTP Methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
|
|
- [HTTP Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)
|
|
- [HTTP Headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers)
|
|
|
|
## Additional Reading
|
|
|
|
- [Python for Humans](/talks/python-for-humans)
|
|
- [Documentation is King](/talks/documentation-is-king)
|
|
- [The Zen of Python](https://www.python.org/dev/peps/pep-0020/)
|
|
- [PEP 8 - Style Guide for Python Code](https://www.python.org/dev/peps/pep-0008/)
|
|
- [Python Requests Library: A Guide](https://realpython.com/python-requests/)
|
|
|
|
## Evolution of the Philosophy
|
|
|
|
> The "HTTP for Humans" approach pioneered by Requests has evolved far beyond API design. The same principles that made this library successful—prioritizing human understanding, reducing cognitive friction, and making complex systems intuitive—now inform broader approaches to [building rapport with AI systems](/essays/2025-08-26-building_rapport_with_your_ai), [programming as spiritual practice](/essays/2025-08-26-programming_as_spiritual_practice), and [the evolution from HTTP to consciousness research](/essays/2025-08-27-from_http_to_consciousness).
|
|
|
|
> What began as frustration with urllib2 became a comprehensive philosophy for human-centered technology design.
|