talira

Requests

HTTP for humans: the standard HTTP client library for Python

open sourceApache-2.0free

Requests is an elegant and simple HTTP library for Python and one of the most downloaded packages on PyPI: you make GET, POST and other requests in a line, without building query strings or form-encoding bodies by hand, and read the response as text, bytes or JSON. It handles keep-alive and connection pooling, sessions with cookie persistence, browser-style SSL verification, automatic content decoding and decompression, Basic and Digest authentication, HTTP(S) proxies, multipart file uploads, streaming downloads, timeouts, chunked requests and .netrc. It's synchronous; for async code people use other clients. It supports Python 3.10 and later, runs on PyPy, and is Apache-2.0 licensed, maintained under the Python Software Foundation's GitHub organization.

Problems it solves

  • make HTTP requests from a Python script
  • call a REST API from Python
  • download a file over HTTP in Python
  • post JSON to an API in Python with authentication

Features

  • one-line GET, POST and other requests
  • JSON responses
  • keep-alive and connection pooling
  • sessions with cookie persistence
  • SSL verification
  • Basic and Digest auth
  • proxies, multipart uploads, streaming downloads
  • timeouts