Skip to main content

Python implementation of SAML Version 2 Standard

Project description

PySAML2 - SAML2 for Python

Version Supported Python versions Total downloads Weekly downloads License

PySAML2 is a pure python implementation of SAML Version 2 Standard. It contains all necessary pieces for building a SAML2 service provider or an identity provider. The distribution contains examples of both. Originally written to work in a WSGI environment there are extensions that allow you to use it with other frameworks.



Contribution guidelines:

Security policies:

Source code:

Developer guidelines:

PyPI project:

License: LICENSE


Retrieved from

SAML V2.0 Standard

Profiles and extensions

Committee Specifications


You can install PySAML2 through pip:

pip install pysaml2

External dependencies

PySAML2 works with the xmlsec binary. This should be readily available in most Linux distributions:

$ apt-get install xmlsec1
$ dnf install xmlsec1-openssl
$ yum install xmlsec1-openssl
$ pacman -S xmlsec

and on MacOS through homebrew

$ brew install libxmlsec1


See the CHANGELOG to learn about the latest developments.


We've set up a separate document for our contribution guidelines.


IdentityPython is a community around a collection of libraries and tools to manage identity related concepts with Python code. You can interact with the community though the mailing list or on the Slack workspace (invitation).


We've set up a separate document for developers.


We've set up a separate document for our release process.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysaml2-7.4.1.tar.gz (342.2 kB view hashes)

Uploaded Source

Built Distribution

pysaml2-7.4.1-py3-none-any.whl (420.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page