Requests

The elegant, human-friendly HTTP library that made Python's most-used API for talking to the web.

Library
PyPI
v2.34.2
54,242stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
85/100Excellent
Development Activity84
Maintenance64
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
89/100Excellent
Architecture90
Code Quality88
Innovation85
Learning Curve92

Requests is Python’s most-downloaded HTTP library, used to send HTTP/1.1 requests without the boilerplate that Python’s built-in urllib demands. It wraps connection pooling, redirect handling, cookie persistence, and content decoding behind a small, readable API, so a GET request with auth and query params is one line of code instead of a dozen.

Built on top of urllib3, idna, charset_normalizer, and certifi, Requests has become the de facto standard for HTTP in Python — GitHub reports it as a dependency of over four million repositories, and it anchors nearly every tutorial, SDK, and scraping script written in the language.

What You Get

  • Simple verb functions (requests.get, .post, etc.) for one-off calls, and a Session object for connection pooling, persistent cookies, and shared headers/auth across many requests
  • Automatic JSON encoding/decoding via the json= kwarg and Response.json(), plus multipart file uploads via files=
  • Built-in Basic/Digest/custom auth handlers, TLS certificate verification (via certifi), and configurable proxy support
  • Transparent redirect following, connection-level retry configuration through HTTPAdapter, and automatic content decompression/decoding
  • A Response object exposing status code, headers, cookies, elapsed time, and both raw and decoded body access

Common Use Cases

  • Calling third-party REST APIs from scripts, backend services, or automation tooling
  • Building lightweight web scrapers and crawlers that need cookie/session persistence
  • Serving as the transport layer underneath higher-level SDKs (cloud provider clients, webhook senders, CLI tools)
  • Writing integration tests that hit real or mocked HTTP endpoints

Under The Hood

Architecture — Requests layers three concerns cleanly: api.py exposes the verb-shaped public functions (get, post, …) that each open a short-lived Session and delegate to it; sessions.py’s Session class owns cross-request state (cookies via a RequestsCookieJar, headers, auth, proxies) and merges per-call overrides with session defaults via merge_setting/merge_hooks; and adapters.py’s HTTPAdapter (a BaseAdapter subclass) wraps a urllib3.PoolManager to actually open sockets, handle retries, and translate low-level urllib3 exceptions into Requests’ own exception hierarchy (exceptions.py). A Request is built into an immutable PreparedRequest (models.py) before being sent, decoupling “what the user asked for” from “what goes on the wire,” which is also what lets Session.send() be called directly for advanced use.

Tech Stack — Pure Python (99%+ of the codebase), packaged with setuptools and a pyproject.toml-driven build. Runtime dependencies are minimal and deliberate: urllib3 for the actual HTTP/connection-pooling implementation, certifi for a bundled CA store, idna for internationalized domain handling, and charset_normalizer for encoding detection — Requests itself is an ergonomics layer on top of urllib3, not a from-scratch HTTP stack. Optional extras (PySocks for SOCKS proxies, chardet) are isolated behind [project.optional-dependencies] so the default install stays lean.

Code Quality — The tests/ directory contains 237+ test functions across test_requests.py plus focused suites for cookies, structures, and internal utilities, run via pytest against httpbin fixtures for realistic request/response behavior; CI-relevant lint/format is enforced with ruff (configured in pyproject.toml) and pre-commit hooks. The package ships a py.typed marker and increasingly precise type hints (_types.py, TypedDict-based kwargs like RequestKwargs), and pyright runs in strict mode over src/requests, which is unusually rigorous for a library this old and this widely depended upon.

API Design — The verb functions (requests.get(url, params=...)) are close to the ergonomic ceiling for a synchronous HTTP client: no client object to construct for a one-off call, sensible defaults (redirects on, cookies handled, JSON body auto-serialized), and a Response object where .json(), .text, .status_code, and truthiness (if response:) all behave the way a newcomer would guess. The main friction point by design is that it is fully synchronous — there is no native async/await support, which is why the httpx project exists as a spiritual successor for async workloads.

Used by 104 apps in this directory

Python
66%
Apache 2.0

Agent Control

AI Agents

295

An open-source runtime control plane for AI agents — define safety guardrails once, apply them across agents built on LangChain, CrewAI, Google ADK, or AWS Strands, and update controls without redeploying code.

View details
79
Repo Health
71
Technical
70
Dependency
Built with
Python66%
TypeScript33%
Updated yesterday
Python
99%
MIT

Agent Lightning

AI Development

17,500

A Microsoft-built training framework that optimizes AI agents with reinforcement learning, automatic prompt optimization, or supervised fine-tuning — with near-zero code changes to your existing agent, in any framework.

View details
84
Repo Health
68
Technical
69
Dependency
Built with
Python99%
Updated today
TypeScript
59%
Other

agenta

Developer Tools · Devops · AI Development

4,489

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript59%
Python39%
Updated today
Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
Python
49%
Other

Airbyte

Developer Tools · Data Engineering

21,916

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
67
Dependency
Built with
Python49%
Kotlin42%
Updated today
Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
Python
76%
MIT

ArchiveBox

Bookmarks Archiving

28,138

Self-hosted web archiving that saves HTML, PDFs, screenshots, media, and code in open formats you own forever

View details
88
Repo Health
84
Technical
70
Dependency
Built with
Python76%
HTML12%
Updated today
Python
59%
Apache 2.0

argilla

AI Development · Data Engineering

5,081

Collaborate on high-quality AI training data with a self-hosted annotation platform built for LLMs, NLP, and multimodal models.

View details
65
Repo Health
81
Technical
63
Dependency
Built with
Python59%
Jupyter Notebook21%
Updated 2 days ago
Python
88%
Apache 2.0

ART

AI Development

10,603

Give your LLM agents on-the-job training—ART lets you apply GRPO reinforcement learning to any multi-step agentic workflow with minimal code changes.

View details
85
Repo Health
82
Technical
72
Dependency
Built with
Python88%
Cuda10%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search