[PR #939] [CLOSED] Add requests-futures to the HTTP section #846

Closed
opened 2025-11-06 13:03:51 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vinta/awesome-python/pull/939
Author: @ross
Created: 9/22/2017
Status: Closed

Base: masterHead: patch-1


📝 Commits (2)

  • 77d4e33 Add requests-futures to the HTTP section
  • 44d45dc Merge branch 'master' into patch-1

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)

📄 Description

What is this Python project?

Python 2/3 library for doing async http requests with python futures. It's strives to be completely API-compatible with requests, just returning futures objects wrapping the response rather than the response itself.

What's the difference between this Python project and similar ones?

Super easy to use, no event loops or anything like that to manage. Uses the new concurrent.futures functionality in Python 3 and it's backport in Python 2.

from requests_futures.sessions import FuturesSession

session = FuturesSession()
# first request is started in background
future_one = session.get('http://httpbin.org/get')
# second request is started immediately
future_two = session.get('http://httpbin.org/get?foo=bar')
# wait for the first request to complete, if it hasn't already
response_one = future_one.result()
print('response one status: {0}'.format(response_one.status_code))
print(response_one.content)
# wait for the second request to complete, if it hasn't already
response_two = future_two.result()
print('response two status: {0}'.format(response_two.status_code))
print(response_two.content)

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vinta/awesome-python/pull/939 **Author:** [@ross](https://github.com/ross) **Created:** 9/22/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (2) - [`77d4e33`](https://github.com/vinta/awesome-python/commit/77d4e336e89a0db813f0bbe5de6a4ca0d209b13a) Add requests-futures to the HTTP section - [`44d45dc`](https://github.com/vinta/awesome-python/commit/44d45dcde90eea2d0016dba6c7b20673230f648d) Merge branch 'master' into patch-1 ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) </details> ### 📄 Description ## What is this Python project? Python 2/3 library for doing async http requests with python futures. It's strives to be completely API-compatible with requests, just returning futures objects wrapping the response rather than the response itself. ## What's the difference between this Python project and similar ones? Super easy to use, no event loops or anything like that to manage. Uses the new [`concurrent.futures`](https://docs.python.org/3/library/concurrent.futures.html) functionality in Python 3 and it's backport in Python 2. ```python from requests_futures.sessions import FuturesSession session = FuturesSession() # first request is started in background future_one = session.get('http://httpbin.org/get') # second request is started immediately future_two = session.get('http://httpbin.org/get?foo=bar') # wait for the first request to complete, if it hasn't already response_one = future_one.result() print('response one status: {0}'.format(response_one.status_code)) print(response_one.content) # wait for the second request to complete, if it hasn't already response_two = future_two.result() print('response two status: {0}'.format(response_two.status_code)) print(response_two.content) ``` -- Anyone who agrees with this pull request could vote for it by adding a :+1: to it, and usually, the maintainer will merge it when votes reach **20**. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 13:03:51 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-python#846