A command-line tool and library for transferring data to or from servers using URLs, covering HTTP, FTP, SFTP, SMTP and many other protocols.
psf/requests
A simple, elegant Python HTTP library for sending HTTP/1.1 requests with sessions, cookies, auth, and JSON support.
- Stars
- 54,614
- Forks
- 12,910
- Open issues
- 244
- Last commit
- 25 days ago
What is it?
Requests is a Python library for making HTTP requests. It removes the need to build query strings by hand or form-encode PUT and POST bodies, and it provides a simple API for sending requests and reading responses, including parsed JSON.
The library covers common client needs: connection pooling and keep-alive, sessions that persist cookies, basic and digest authentication, streaming downloads, multipart file uploads, timeouts, SOCKS proxy support, and automatic decompression. It also honors .netrc credentials and handles international domain names and URLs.
Requests is installed from PyPI with pip and officially supports Python 3.10 and newer.
Key features
- 01Connection pooling and keep-alive for reusing connections
- 02Sessions that persist cookies across requests
- 03Basic and digest authentication
- 04Streaming downloads and multipart file uploads
- 05Timeouts, SOCKS proxy support, and automatic content decoding
Use cases
- Calling REST APIs from Python scripts or backend services
- Downloading large files in chunks with streaming
- Automating web logins that require cookies and authentication
- Uploading files to web services using multipart requests
Quick start
- 1
Install Requests from PyPI
python -m pip install requests
Things to know
- Requires Python 3.10 or newer.
Topics
FAQ
- What is requests?
- A simple, elegant Python HTTP library for sending HTTP/1.1 requests with sessions, cookies, auth, and JSON support. Requests is a Python library for making HTTP requests. It removes the need to build query strings by hand or form-encode PUT and POST bodies, and it provides a simple API for sending requests and reading responses, including parsed JSON.
- Is requests free to use? What license does it have?
- requests is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is requests still maintained?
- Actively maintained. The last commit to requests was on Sep 28, 2026.
- What can I use requests for?
- Calling REST APIs from Python scripts or backend services Downloading large files in chunks with streaming Automating web logins that require cookies and authentication Uploading files to web services using multipart requests
- How do I install requests?
- Install Requests from PyPI: python -m pip install requests
- Where can I get requests?
- The source code and installation instructions are on GitHub: https://github.com/psf/requests
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Fast HTTP server and client implementation for Go, designed for high-throughput workloads and low allocation overhead.
Open-source API development ecosystem for sending REST, GraphQL, WebSocket, SSE, Socket.IO and MQTT requests, offered as web, desktop and CLI apps.
A C++11 single-header library for building HTTP/HTTPS servers and clients with blocking socket I/O.
A type-safe HTTP client for Android and Java that turns annotated interface methods into network calls.
A desktop API client for REST, GraphQL, WebSocket, SSE and gRPC, built with Tauri, Rust and React, offline-first and without telemetry.