psf

Requests is a simple yet elegant Python HTTP library for sending HTTP/1.1 requests with minimal code, handling query strings, form encoding, cookies, auth, and decompression automatically.

v2.34.2
Published at
May 14, 2026
54,522
Stars
7,644
Download
Synced at
8d ago

Latest release

v2.34.2May 14, 2026, 07:27 PM
Downloads slow? Switch the source anytime above

README

Project Overview

Requests is a simple, elegant HTTP library for Python that makes sending HTTP/1.1 requests extremely easy: no manual query string building, no manual form encoding, and JSON bodies via the json parameter. With around 300M downloads per week and dependencies in over 4,000,000 repositories, it is the de facto HTTP client standard of the Python ecosystem.

Item Value
Language Python
Type HTTP client library
Python version 3.10+
License Apache-2.0

HTTP for humans: requests, cookies, and auth in a few lines.

Key Features

  • Minimal requests: one function call for GET, POST, and more
  • Sessions: Session objects keep cookies persistent across requests
  • Connection reuse: Keep-Alive and connection pooling for efficiency
  • Authentication: built-in Basic and Digest authentication
  • TLS verification: browser-style SSL/TLS certificate verification
  • Auto decoding: automatic content decompression and character decoding
  • File uploads: multipart-encoded file uploads
  • Proxies: support for HTTP and SOCKS proxies
  • Streaming: streaming downloads and connection timeouts

Target Audience

  • Python backend and scraping developers
  • Engineers calling third-party HTTP APIs
  • Developers writing API test scripts
  • Ops and data collection staff

Quick Start

  1. Install: python -m pip install requests
  2. Send an authenticated request and parse the response
import requests

r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
print(r.status_code)
print(r.json())
  1. Use a Session to reuse connections and cookies
with requests.Session() as s:
    s.get('https://httpbin.org/cookies/set/x/1')
    print(s.cookies)

Core Advantages

  • Friendly API: dict-like cookies and automatic encoding read almost like prose
  • Battle tested: massive scale usage proves stability and compatibility
  • Feature complete: auth, proxies, compression, timeouts, and streaming built in
  • Clear docs: thorough official documentation and rich community material

System Requirements

Item Requirement
Language Python 3.10+
OS Linux, macOS, Windows

Notes

  • Synchronous only: Requests is a synchronous library, evaluate carefully for high-concurrency async scenarios
  • No default retries: the library does not retry automatically, combine it with a urllib3 Retry policy when needed

Release history

Sort