$npx skillfedfor your agent

pysaml2

Python implementation of SAML Version 2 Standard

With conditionsPyPI Python ModulesReleased Oct 20252.6M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pysaml2-7.5.4-py3-none-any.whl
v7.5.4 · released 2025-10-07 · Python >=3.9 · 6 runtime deps: cryptography, defusedxml, pyopenssl, python-dateutil, requests, xmlschema

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.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • 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.
  • Low install friction with a pure-wheel distribution.

License · maintenance · safety

(unclear) — 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.

last release 2025-10-07 (311 days) · last repo commit 2026-02-11 · 609 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,595,971 downloads/mo, #2,975 on PyPI

Verify before relying

pip install pysaml2

import pysaml2
from pysaml2 import client
from pysaml2 import config
  • 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
Same gist for agents: .md · .json

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 on this page. Verify before relying on it.

With conditions

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

pysaml2 on PyPI

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.

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.

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

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

LicenseNot declared unclear
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
cryptographydefusedxmlpyopensslpython-dateutilrequestsxmlschema
MaintenanceAging 311 days since the last release
Last repo commit
First released
Downloads2,595,971 / month, #2,975 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Topic :: Software Development :: Libraries :: Python Modules

Evidence: pysaml2-7.5.4-py3-none-any.whl

Tags

Capabilities
saml2 authenticationidentity provider pythonsaml service providerfederated identitysaml protocol implementationsso single sign-onsaml assertions
Topics
saml-federationidentity-managemententerprise-auth
PyPI keywords
samlsaml2standardfederationidentityidpyIdentityPython

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 › “identity provider python”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also djangosaml2idp2 · python3-saml · grafana-django-saml2-auth · djangosaml2 · types-pysaml2 · xmlsec · signxml · social-auth-core · requests-negotiate-sspi · social-auth-app-django