--- id: pysaml2 version: "7.5.4" license: unclear license_treatment: unclear maintenance: aging --- # pysaml2 — Python implementation of SAML Version 2 Standard License: unclear · Maintenance: aging · Downloads: 2.6M/mo ## What it is and what it does PySAML2 is a pure Python library implementing the OASIS SAML Version 2 Standard, enabling you to build SAML2 service providers or identity providers. It handles core SAML2 protocols, assertions, bindings, and metadata as specified by the standard, and was originally designed for WSGI environments with extensions for other frameworks. The package depends on cryptography, defusedxml, pyopenssl, python-dateutil, requests, and xmlschema to parse and validate SAML2 XML structures. It requires Python 3.9 or later and is maintained by the IdentityPython community. With nearly 2.6 million monthly downloads, it is widely used for enterprise federated authentication and single sign-on integrations. Use it for: - Build a web application that accepts SAML2 assertions from a corporate identity provider for enterprise SSO - Implement a SAML2 identity provider to issue assertions for federated access to partner applications - Parse and validate SAML2 metadata to discover and configure connections with other SAML2 participants - Handle SAML2 authentication flows in Python web frameworks beyond WSGI using community extensions - Manage SAML2 bindings and protocols for secure attribute exchange in federation scenarios ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. PySAML2 is a pure Python implementation of SAML Version 2 Standard for building SAML2 service providers or identity providers. Yes, with a license verification step. PySAML2 is a mature, widely-used implementation of a critical standard for enterprise identity federation. Install friction is low, security vulnerabilities are absent, and it supports current Python versions. However, resolve the unclear license status before committing to production use. The aging maintenance status is not a blocker given the stable repository state and active community. ## Install pip install pysaml2 uv add pysaml2 poetry add pysaml2 ## Installing pysaml2 Before you install: Low install friction with a pure-wheel distribution. Maintenance status is aging—last release was 311 days ago, though the repository remains active with a recent commit on 2026-02-11 and carries 609 GitHub stars. License in practice: License treatment is unclear—neither SPDX nor raw license metadata is available in the package metadata. Before adopting, verify the actual license terms directly from the repository or project documentation to ensure compliance with your use case. Quickstart: pip install pysaml2 import pysaml2 from pysaml2 import client from pysaml2 import config Requires the xmlsec binary to be installed on the system (e.g., apt-get install xmlsec1 on Linux, brew install libxmlsec1 on macOS). PySAML2 wraps this external tool for cryptographic operations. Verify before relying: - Specific SAML2 profiles and bindings supported beyond the core standard - Performance characteristics with large numbers of assertions or metadata - Compatibility with specific identity providers or SAML2 implementations - Whether the aging maintenance status reflects stability or reduced active development ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 2.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags saml2 authentication, identity provider python, saml service provider, federated identity, saml protocol implementation, sso single sign-on, saml assertions, saml-federation, identity-management, enterprise-auth [View on SkillFed](https://skillfed.io/packages/pysaml2) · [View on PyPI](https://pypi.org/project/pysaml2/)