Pythonrequestsv2.33.1
PythonBeginner-friendly

requests

Python HTTP for Humans

httprequestspythonapi-clientrestlibrarieswww/httpclientcookiesforhumans
The Problem

Python's built-in urllib is painfully verbose โ€” you need dozens of lines just to make a POST request with headers and parse the response. Before requests, every team wrote their own wrapper or copied boilerplate. Kenneth Reitz published requests in 2011 and the community never looked back.

Mental Model

Think of requests as a polished envelope system for HTTP: you stuff your data in, address it with a URL and headers, send it, and get a clean Response object back. The library handles encoding, redirects, cookies, and keep-alive connections so you don't have to.

60-second start

Install requests

pip install requests
import requests

Use it when

Use requests for any synchronous HTTP work: calling REST APIs, scraping web pages, downloading files, or integrating with webhooks. It's the right default for scripts, CLI tools, and Django/Flask backends that don't need async.

Skip it when

Avoid requests when you're writing async code โ€” it will block your event loop. Switch to httpx (drop-in async API) or aiohttp for FastAPI backends, async scrapers, or anything running inside asyncio.

Alternatives
httpxDrop-in async-compatible replacement; supports HTTP/2 and is the natural upgrade path
aiohttpMature async HTTP client/server built specifically for asyncio workloads
urllib3Lower-level library that requests itself uses; reach for it only when you need fine-grained connection control

Ready to explore the full API?

See every class, function, and relationship in an interactive graph.