Skip to content
Commitpedia
Log in Join & edit

Requests: HTTP for humans

Requests is the classic Python library for calling web APIs and downloading pages, with a simple API for GET and POST requests, headers, JSON and sessions.

Not checked by a trusted editor yet Last edited Outdated?

Edit history of Requests: HTTP for humans: 1 recorded edit
Edit history · 1 edit
Type
Repo
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Source
psf/requests

psf/requests

Stars
54.5k
Forks
12.9k
Language
Python
Licence
Apache-2.0
Last push
28 Sep 2026

On GitHub: A simple, yet elegant, HTTP library.

Open on GitHub

Requests wraps the details of HTTP in a small, readable API: requests.get(url, params=..., timeout=10) returns a response with .status_code, .text and .json(). It handles redirects, cookies, form and JSON bodies, authentication and connection reuse through requests.Session. It is maintained under the Python Software Foundation’s GitHub organization and is one of the most commonly installed third-party packages.

Reach for it in automation scripts that talk to REST APIs, webhooks or download files. Always pass a timeout (Requests waits indefinitely by default) and call response.raise_for_status() to turn HTTP errors into exceptions. If you need async support or HTTP/2, look at alternatives such as HTTPX; if you cannot install packages at all, the standard library’s urllib.request works with more boilerplate.

Requests is not part of the standard library, so it is a typical source of ModuleNotFoundError: No module named 'requests'. Install it inside a virtual environment with python -m pip install requests, as described in the venv and ModuleNotFoundError articles.

See also

  • 0003 pathlib cheat sheet: files and folders in Python pathlib.Path is the modern way to build paths, read and write files, and list or search folders in Python. This page lists… Beginner · Reference · Any system Article Files & automation 15 Oct 2026
  • 0004 Logging instead of print The logging module gives every message a level, a timestamp and a destination you can change without editing code. It is the… Intermediate · Concept · Any system Article Files & automation 15 Oct 2026
  • 0009 CSV to JSON converter A small command-line tool that turns a CSV file into a JSON array of objects, with optional number detection, custom delimiters and… Beginner · How-to · Any system Script CSV & JSON · Files & automation 15 Oct 2026
  • 0010 Find duplicate files by content Scans folders and lists files with identical content, using file size first and SHA-256 hashes second. It is read-only and only reports… Intermediate · How-to · Any system Script Files & automation 15 Oct 2026
  • 0019 fetch with timeout, retries and proper error handling A reusable fetchJson helper for Node 20+ and browsers that adds a timeout, retries with backoff for temporary failures, and clear errors… Intermediate · How-to · Any system Script Async code · Making requests 15 Oct 2026
  • 0074 pandas basics: read a CSV, filter rows and summarize with groupby Load a CSV into a pandas DataFrame, inspect it, filter rows with conditions, and compute totals per group, with the SQL equivalent… Intermediate · How-to · Any system Article Data analysis · Files & automation 15 Oct 2026

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Commitpedia +1,083 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?