types-pysaml2
Type Stubs for pysaml2
What it is and what it does
types-pysaml2 is a stub package that adds type annotations for the pysaml2 SAML authentication library. It allows developers using pysaml2 to get static type checking support in their IDE and type checkers like mypy, catching type errors before runtime. The package is explicitly marked as partial, covering only some of the functions and objects available in pysaml2, and contributions are welcome to expand coverage.
Since this is a pure stub package with no runtime dependencies, installation is lightweight and friction-free. However, the package is abandoned—the last release was 1306 days ago—meaning it will not track updates to pysaml2 itself, and type coverage gaps may persist or grow as pysaml2 evolves.
Use it for:
- Add type checking to an existing pysaml2-based SAML authentication system without changing runtime behavior.
- Catch type mismatches in pysaml2 API calls during development using mypy or similar type checkers.
- Improve IDE autocomplete and inline documentation for pysaml2 objects and functions.
- Validate SAML client and server configuration code before deployment in a typed Python project.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type annotations (stubs) for the pysaml2 SAML authentication library, enabling static type checking in projects that use pysaml2.
Yes, but with caution. Install if you are already using pysaml2 and want type checking support in a stable, older codebase. Do not install if you are using a recent version of pysaml2 or expect the stubs to stay current—the package is abandoned and will not track pysaml2 updates. The GPLv3 copyleft license also requires careful review if you plan to distribute your code.
Install
types-pysaml2 on PyPI
pip
pip install types-pysaml2uv
uv add types-pysaml2poetry
poetry add types-pysaml2Installing types-pysaml2
Before you install
Installs with no runtime dependencies. However, the package is abandoned (last release 1306 days ago) and marked as Alpha, so type coverage may be incomplete and will not track future pysaml2 changes.
License in practice
Licensed under GPLv3 (copyleft). Any project using this package must comply with GPLv3 terms, including potential source code disclosure obligations if distributed.
Quickstart
pip install types-pysaml2
# In your code, import pysaml2 as usual; type checkers will now resolve types
import pysaml2
from pysaml2.client import Client
Requires Python 3.7 or later. Type checking requires a static type checker like mypy or pyright to be configured in your project.
Verify before relying
- How much of pysaml2's API surface is actually covered by these stubs (described as 'partial' but no percentage given).
- Whether the stubs remain compatible with recent versions of pysaml2 given the time since last release.
Package facts
| License | GPLv3 (copyleft) |
| Python support | supports the current Python release (>=3.7, <4) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,306 days since the last release |
| First released | |
| Downloads | 155,417/month — #10,815 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_pysaml2-1.0.1-py3-none-any.whl
Keywords: stubs, pysaml2, pysaml, saml2, saml
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-smorestProvides type stubs for flask-smorest, enabling…
copyleft · top 5,000 on PyPI
types-sqlalchemy-utilsProvides type stubs for sqlalchemy-utils,…
copyleft · top 5,000 on PyPI
pysaml2PySAML2 is a pure Python implementation of SAML…
unclear · top 5,000 on PyPI
plotly-stubsProvides static type annotations (stubs) for…
permissive · top 15,000 on PyPI
djangosaml2Integrates SAML2 single sign-on authentication…
permissive · top 15,000 on PyPI
djangosaml2idp2Implements the SAML 2.0 Identity Provider side…
permissive · top 15,000 on PyPI
grafana-django-saml2-authA compatibility shim that redirects to…
permissive · top 15,000 on PyPI
python3-samlTurns a Python application into a SAML 2.0…
permissive · top 5,000 on PyPI
types-pyOpenSSLProvides type stubs for pyOpenSSL to enable…
permissive · top 5,000 on PyPI
types-httplib2Provides type stubs for the httplib2 HTTP…
permissive · top 5,000 on PyPI