types-oauthlib
Typing stubs for oauthlib
What it is and what it does
types-oauthlib is a type stub package that provides type information for the oauthlib library, which implements OAuth 1.0 and OAuth 2.0 protocols. It allows static type checkers like mypy and pyright to understand and validate code that uses oauthlib, catching type errors before runtime. The stubs are maintained as part of the typeshed project and are tested against mypy 2.3.0 and pyright 1.1.411, targeting oauthlib version 3.3.*.
This package has no runtime dependencies and is purely a development tool—it does not execute code or add functionality to oauthlib itself. It is installed alongside oauthlib in projects that use type checking, and it requires Python 3.10 or later. The package is actively maintained and released regularly as typeshed evolves.
Use it for:
- Enable mypy or pyright to type-check code using oauthlib for OAuth 2.0 server and client implementations
- Catch type errors in OAuth token handling and authorization flows before runtime
- Provide IDE autocompletion and type hints when working with oauthlib in a modern editor
- Validate OAuth request/response handling in applications integrating third-party authentication
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the oauthlib package, enabling type checkers like mypy and pyright to validate code that uses oauthlib for OAuth protocol implementation.
Yes, if you use oauthlib and type checking. Install it in projects that depend on oauthlib and use mypy or pyright to catch OAuth-related type errors early. It has no runtime cost and is actively maintained as part of typeshed. Skip it only if you do not use static type checking or do not use oauthlib.
Install
types-oauthlib on PyPI
pip
pip install types-oauthlibuv
uv add types-oauthlibpoetry
poetry add types-oauthlibInstalling types-oauthlib
Before you install
Low friction installation with no runtime dependencies. Actively maintained as part of typeshed; released 21 days ago with recent commits.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction.
Quickstart
pip install types-oauthlib
# Then use with a type checker in your project that imports oauthlib
# mypy or pyright will now resolve type information for oauthlib
Requires Python 3.10 or later. Only useful when used alongside a type checker (mypy, pyright, etc.) and the oauthlib package itself.
Verify before relying
- Whether these stubs cover all public APIs of oauthlib 3.3.x or only a subset
- Compatibility with oauthlib versions outside the 3.3.* range
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,492,943/month — #3,840 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_oauthlib-3.3.0.20260724-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
google-auth-oauthlib-stubsProvides type stubs for google-auth-oauthlib to…
permissive · top 15,000 on PyPI
types-AuthlibProvides type stubs for Authlib, enabling…
permissive · top 5,000 on PyPI
types-httplib2Provides type stubs for the httplib2 HTTP…
permissive · top 5,000 on PyPI
types-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-requests-oauthlibProvides type hints for requests-oauthlib,…
permissive · top 15,000 on PyPI
types-passlibProvides type stubs for the passlib…
permissive · top 5,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-boltonsProvides type stubs for the boltons library,…
permissive · top 15,000 on PyPI
types-auth0-pythonProvides type stubs for auth0-python 4.10.x,…
permissive · top 15,000 on PyPI
types-requestsProvides type annotations for the requests…
permissive · top 1,000 on PyPI