🌐
GitHub
github.com › psf › requests
GitHub - psf/requests: A simple, yet elegant, HTTP library. · GitHub
Requests officially supports Python 3.10+.
Starred by 53.9K users
Forked by 9.8K users
Languages   Python 99.3% | Makefile 0.7%
🌐
GitHub
github.com › topics › python-requests
python-requests · GitHub Topics · GitHub
Requests 3.0, for Humans and Machines, alike. 🤖 · http http-client python3 requests forhumans kennethreitz python-requests requests-module
Discussions

Using Python, Oauth, Github to request pages from adventofcode
You can get the session ID from your browser's cookies once you're logged in to the AoC site, and include that cookie when making the request in your code. This is what I use - uri = 'http://adventofcode.com/{year}/day/{day}/input'.format(year=YEAR, day=day) response = requests.get(uri, cookies={'session': SESSIONID}, headers={'User-Agent': USER_AGENT}) Remember to cache the response, so you don't make too many unnecessary requests to the server. More on reddit.com
🌐 r/adventofcode
5
2
December 2, 2019
I benchmarked Python's top HTTP clients (requests, httpx, aiohttp, etc.) and open sourced it
You thought people were more interested in the benchmark code than the results? More on reddit.com
🌐 r/Python
54
219
March 30, 2025
python - How to download and write a file from Github using Requests - Stack Overflow
Lets say there's a file that lives at the github repo: https://github.com/someguy/brilliant/blob/master/somefile.txt I'm trying to use requests to request this file, write the content of it to di... More on stackoverflow.com
🌐 stackoverflow.com
Seeking Help: Filtering Issues without Associated Pull Requests in GitHub
Hello everyone, I’m currently working on a Python project and I’m facing a challenge in filtering issues from a repository that don’t have any associated pull requests. I would greatly appreciate it if someone could help me with this issue. Here’s the code snippet I’m using: pythonCopy ... More on discuss.python.org
🌐 discuss.python.org
0
0
June 23, 2023
🌐
GitHub
github.com › requests
requests · GitHub
requests/toolbelt’s past year of commit activity ... An authentication handler for using Kerberos with Python Requests.
🌐
GitHub
github.com › python › cpython › blob › main › Lib › urllib › request.py
cpython/Lib/urllib/request.py at main · python/cpython
f = urllib.request.urlopen('https://www.python.org/') """ · # XXX issues: # If an authentication error handler that tries to perform · # authentication for some reason but fails, how should the error be · # signalled? The client needs to know the HTTP error code.
Author   python
🌐
Reddit
reddit.com › r/adventofcode › using python, oauth, github to request pages from adventofcode
r/adventofcode on Reddit: Using Python, Oauth, Github to request pages from adventofcode
December 2, 2019 -

Day 1 problem was easy but sent me off on a tangent. I wanted to retrieve the mass input data directly from the website

import requests
URL = "https://adventofcode.com/2019/day/1/input"
r = requests.get(URL)
for x in r.iter_lines():
    print(x)

This fails with, "Puzzle inputs differ by user. Please log in to get your puzzle input."

I use my github account to login to adventofcode. So I guess I need to use Oauth somehow. But I'm not clear the approach to take.

Github::Settings::DeveloperSettings has three things, "Github Apps", "Oauth Apps" and "Personal Access Tokens" but none looks obviously like what I need.

The Oauth1 Authentication section of the requests doc doesn't look like anything I setup on the github side (YOUR_APP_KEY, YOUR_APP_SECRET_, USER_OAUTH_TOKEN, USER_OAUTH_TOKEN_SECRET).

I feel like i must be mixing up different protocols and different usages. Can anyone point me directly at what i should setup to do this?

software library for HTTP connection in Python
Requests is an HTTP client library for the Python programming language. Requests is one of the most downloaded Python libraries, with over 30 million monthly downloads. It maps the HTTP protocol onto … Wikipedia
Factsheet
Original author Kenneth Reitz
Developers Cory Benfield, Ian Stapleton Cordasco, Nate Prewitt
Initial release 14 February 2011 (2011-02-14)
Factsheet
Original author Kenneth Reitz
Developers Cory Benfield, Ian Stapleton Cordasco, Nate Prewitt
Initial release 14 February 2011 (2011-02-14)
🌐
Requests
requests.readthedocs.io
Requests: HTTP for Humans™ — Requests 2.33.0.dev1 documentation
Requests is an elegant and simple HTTP library for Python, built for human beings. Behold, the power of Requests: >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' ...
Find elsewhere
🌐
GitHub
github.com › luminati-io › python-requests
GitHub - luminati-io/python-requests: Python's 'requests' library: learn HTTP methods, parsing responses, proxy usage, timeouts, and more for efficient web scraping. · GitHub
Python's 'requests' library: learn HTTP methods, parsing responses, proxy usage, timeouts, and more for efficient web scraping. - luminati-io/python-requests
Author   luminati-io
🌐
Reddit
reddit.com › r/python › i benchmarked python's top http clients (requests, httpx, aiohttp, etc.) and open sourced it
r/Python on Reddit: I benchmarked Python's top HTTP clients (requests, httpx, aiohttp, etc.) and open sourced it
March 30, 2025 -

Hey folks

I’ve been working on a Python-heavy project that fires off tons of HTTP requests… and I started wondering:
Which HTTP client should I actually be using?

So I went looking for up-to-date benchmarks comparing requestshttpxaiohttpurllib3, and pycurl.

And... I found almost nothing. A few GitHub issues, some outdated blog posts, but nothing that benchmarks them all in one place — especially not including TLS handshake timings.

What My Project Does

This project benchmarks Python's most popular HTTP libraries — requests, httpx, aiohttp, urllib3, and pycurl — across key performance metrics like:

  • Requests per second

  • Total request duration

  • Average connection time

  • TLS handshake latency (where supported)

It runs each library multiple times with randomized order to minimize bias, logs results to CSV, and provides visualizations with pandas + seaborn.

GitHub repo: 👉 https://github.com/perodriguezl/python-http-libraries-benchmark

Target Audience

This is for developers, backend engineers, researchers or infrastructure teams who:

  • Work with high-volume HTTP traffic (APIs, microservices, scrapers)

  • Want to understand how different clients behave in real scenarios

  • Are curious about TLS overhead or latency under concurrency

It’s production-oriented in that the benchmark simulates realistic usage (not just toy code), and could help you choose the best HTTP client for performance-critical systems.

Comparison to Existing Alternatives

I looked around but couldn’t find an open source benchmark that:

  • Includes all five libraries in one place

  • Measures TLS handshake times

  • Randomizes test order across multiple runs

  • Outputs structured data + visual analytics

Most comparisons out there are outdated or incomplete — this project aims to fill that gap and provide a transparent, repeatable tool.

Update: for adding results

Results after running more than 130 benchmarks.

https://ibb.co/fVmqxfpp

https://ibb.co/HpbxKwsM

https://ibb.co/V0sN9V4x

https://ibb.co/zWZ8crzN

Best of all reqs/secs (being almost 10 times daster than the most popular requests): aiohttp

Best total response time (surpringly): httpx

Fastest connection time: aiohttp

Best TLS Handshake: Pycurl

🌐
Medium
medium.com › analytics-vidhya › getting-started-with-github-api-dc7057e2834d
Getting Started with Github API. REST API v3 using Python | by Gaganpreet Kaur Kalsi | Analytics Vidhya | Medium
July 20, 2020 - In this article, learn how to use Github API to create, delete a repository; create an issue, comment, and close an issue and many more using python. Learn how to read API documentation and make GET, POST and DELETE requests. Also learn how to generate a token. Getting Started with Github API from ...
🌐
GitHub
github.com › kennethreitz › requests3
GitHub - kennethreitz/requests3: Requests 3.0, for Humans and Machines, alike. 🤖
Requests III is an HTTP library for Python, built for Humans and Machines, alike.
Starred by 794 users
Forked by 38 users
Languages   Python
🌐
GitHub
github.com › python › cpython › pulls
Pull requests · python/cpython
python / cpython Public · There was an error while loading. Please reload this page. Notifications · You must be signed in to change notification settings · Fork 34.2k · Star 72k · New pull request New · 2,129 Open 67,173 Closed · 2,129 Open 67,173 Closed ·
Author   python
🌐
GitHub
github.com › WilliamQLiu › python-examples › blob › master › requests › example_requests.py
python-examples/requests/example_requests.py at master · WilliamQLiu/python-examples
"User-Agent": "python-requests/2.5.3 CPython/2.7.9 Darwin/14.1.0" }, "json": null, "origin": "74.71.230.126", "url": "http://httpbin.org/post" } """ · · def pass_headers_in_request(): """ Add HTTP headers to a request by adding a dict to the 'headers' param · """ url = 'https://api.github.com/some/endpoint' payload = { 'some': 'data' } headers = { 'content-type': 'application/json' } r = requests.post(url, data=json.dumps(payload), headers=headers) print r ·
Author   WilliamQLiu
🌐
GitHub
github.com › requests › toolbelt
GitHub - requests/toolbelt: A toolbelt of useful classes and functions to be used with python-requests · GitHub
A toolbelt of useful classes and functions to be used with python-requests - requests/toolbelt
Starred by 1K users
Forked by 194 users
Languages   Python
🌐
GitHub
github.com › juancarlospaco › faster-than-requests
GitHub - juancarlospaco/faster-than-requests: Faster requests on Python 3
Faster requests on Python 3. Contribute to juancarlospaco/faster-than-requests development by creating an account on GitHub.
Starred by 1.1K users
Forked by 91 users
Languages   Nim 69.7% | Python 25.9% | Dockerfile 2.7% | Shell 1.7% | Nim 69.7% | Python 25.9% | Dockerfile 2.7% | Shell 1.7%
🌐
GitHub
github.com › psf › requests-html
GitHub - psf/requests-html: Pythonic HTML Parsing for Humans™
>>> from requests_html import AsyncHTMLSession >>> asession = AsyncHTMLSession() >>> async def get_pythonorg(): ... r = await asession.get('https://python.org/') ... return r ... >>> async def get_reddit(): ... r = await asession.get('https...
Starred by 13.9K users
Forked by 1K users
Languages   Python 99.7% | Makefile 0.3%
🌐
Requests
requests.readthedocs.io › en › latest › user › quickstart
Quickstart — Requests 2.33.0.dev1 documentation
>>> import requests >>> r = requests.get('https://api.github.com/events') >>> r.json() [{'repository': {'open_issues': 0, 'url': 'https://github.com/... In case the JSON decoding fails, r.json() raises an exception. For example, if the response gets a 204 (No Content), or if the response contains invalid JSON, attempting r.json() raises requests.exceptions.JSONDecodeError. This wrapper exception provides interoperability for multiple exceptions that may be thrown by different python versions and json serialization libraries.
🌐
Real Python
realpython.com › python-requests
Python's Requests Library (Guide) – Real Python
July 23, 2025 - One common way to customize a GET request is to pass values through query string parameters in the URL. To do this using get(), you pass data to params. For example, you can use GitHub’s repository search API to look for popular Python repositories:
🌐
Python.org
discuss.python.org › python help
Seeking Help: Filtering Issues without Associated Pull Requests in GitHub - Python Help - Discussions on Python.org
June 23, 2023 - Hello everyone, I’m currently working on a Python project and I’m facing a challenge in filtering issues from a repository that don’t have any associated pull requests. I would greatly appreciate it if someone could help me with this issue. Here’s the code snippet I’m using: pythonCopy code new_issues = [] for index, row in contributor_filtered_df.iterrows(): contributor = row["assignee"] issues = repo.get_issues(state="open", assignee=contributor) for issue in issues: ...
🌐
Reddit
reddit.com › r/webscraping › how good is python's requests at being undetected?
r/webscraping on Reddit: How good is Python's requests at being undetected?
November 21, 2024 -

Hello. Good day everyone.

I am trying to reverse engineer a major website's API using pure HTTP requests. I chose Python's requests module as my go-to technology to work with because I'm familiar with Python. But I am wondering how good is Python's requests at being undetected and mimicking a browser..? If it's a no go, could you maybe suggest a technology that is light on bandwidth, uses only HTTP requests without loading a browser's driver, and stealthy.

Thanks