types-requests
Typing stubs for requests
Decision gist · record as of 2026-08-14
Yes, if you use requests <2.34.0 and want static type checking. No, if you are already on requests 2.34.0 or later—uninstall this package and rely on requests' built-in annotations instead. Install only if your type checker needs explicit stubs for an older requests version.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Requires urllib3>=2 (since v2.31.0.7).
- If your environment needs urllib3<2, use types-requests<2.31.0.7.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects without restriction.
last release 2026-07-12 (33 days) · last repo commit 2026-08-13 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 129,861,978 downloads/mo, #291 on PyPI
Alternatives
Verify before relying
pip install types-requests
# In your code, type checkers will now understand requests types:
import requests
response: requests.Response = requests.get('https://example.com')- Whether requests 2.34.0+ is already widely adopted, making this package unnecessary for most new projects
- Compatibility with type checkers beyond mypy 2.2.0 and pyright 1.1.411
What it is and what it does
types-requests is a type stub package that provides type annotations for the requests HTTP library. It allows static type checkers like mypy and pyright to understand and validate code that uses requests, catching type errors before runtime. The package is maintained as part of the typeshed project and tracks requests version 2.33.0.
The package has a single runtime dependency on urllib3 and requires Python 3.10 or later. It is a stub-only package with no executable code—it exists purely to supply type information to type checkers. However, it is becoming less necessary: the requests library itself has included type annotations since version 2.34.0, making this package redundant for projects using that version or newer.
Use it for
- Enable mypy or pyright to type-check code that calls requests methods and validates response types
- Catch type errors in requests usage (e.g., passing wrong argument types to get/post) before running tests
- Provide IDE autocomplete and type hints for requests in editors that support static type information
- Maintain type safety in a codebase that uses requests 2.33.0 or earlier before upgrading to 2.34.0+
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use requests <2.34.0 and want static type checking.
No, if you are already on requests 2.34.0 or later—uninstall this package and rely on requests' built-in annotations instead. Install only if your type checker needs explicit stubs for an older requests version.
Install
types-requests on PyPI
Before you install
Low friction install with a single runtime dependency (urllib3). Actively maintained as part of typeshed; last release 33 days ago. Note: requests 2.34.0+ includes its own type stubs, making this package redundant for newer requests versions.
Requires Python 3.10 or later. Requires urllib3>=2 (since v2.31.0.7). If your environment needs urllib3<2, use types-requests<2.31.0.7.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction.
Quickstart
pip install types-requests
# In your code, type checkers will now understand requests types:
import requests
response: requests.Response = requests.get('https://example.com')
Verify before relying
- Whether requests 2.34.0+ is already widely adopted, making this package unnecessary for most new projects
- Compatibility with type checkers beyond mypy 2.2.0 and pyright 1.1.411
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageurllib3 |
| Maintenance | Actively maintained 33 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 129,861,978 / month, #291 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_requests-2.33.0.20260712-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “requests type hints”
- types-requestsProvides type annotations for the requests library, enabling type…
- types-requests-oauthlibProvides type hints for requests-oauthlib, enabling static type…
- device-detectorParses user agent strings and client hints to detect the browser,…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
Provides type stubs for the `decorator` package, enabling type checkers like mypy and pyright to validate code that uses decorator patterns without runtime overhead.
Provides type stubs for Flask-Cors to enable static type checking of Flask-Cors code with mypy, pyright, and other type checkers.
Provides type stubs for the Markdown package, enabling type checkers like mypy and pyright to validate code that uses Markdown.
Provides type stubs for the httplib2 HTTP client library, enabling static type checkers like mypy and pyright to validate code that uses httplib2.
Provides type stubs for the oauthlib package, enabling type checkers like mypy and pyright to validate code that uses oauthlib for OAuth protocol implementation.
Provides type hints for the pynput library, enabling static type checkers like mypy and pyright to validate code that uses pynput for keyboard and mouse input.
See also types-auth0-python · types-boltons · types-jmespath · types-mypy-extensions