Registry / web-framework / djangosaml2idp2

djangosaml2idp2

JSON →
library0.9.1pypypiunverified

SAML 2.0 Identity Provider for Django. Current version 0.9.1, released Jan 2025. Maintained on GitHub, monthly patch releases.

pip install djangosaml2idp2
INSTALL
IMPORT
SIG · DJANGOSAML2IDP2
D
djangosaml2idp2
web-frameworkpythonv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IdP
✓ from djangosaml2idp import IdP
✗ from djangosaml2idp.models import IdP

Add to INSTALLED_APPS, include URLs, and define SAML_IDP_CONFIG.

# INSTALLED_APPS += ['djangosaml2idp'] # urls.py from django.urls import path, include urlpatterns = [ path('saml2/', include('djangosaml2idp.urls')), ] # settings.py SAML_IDP_CONFIG = { 'entity_id': 'https://your-idp.example.com/saml2/metadata/', 'acs_endpoint': 'https://your-idp.example.com/saml2/acs/', 'attribute_map': { 'email': 'email', 'username': 'username', }, }
Debug
Known issues
breakingIn v0.9.0 the model class 'IdentityProvider' was renamed to 'IdP'. Any code referencing IdentityProvider must be updated.
fix
Replace 'IdentityProvider' with 'IdP' in imports and queries.
affects: <0.9.0
deprecatedThe setting 'SAML_IDP_ATTRIBUTE_MAP' is deprecated; use 'SAML_IDP_CONFIG['attribute_map']' instead.
fix
Move attribute map inside SAML_IDP_CONFIG dict.
affects: <0.9.0
gotchaThe package is installed as 'djangosaml2idp2' on PyPI, but the Python module is 'djangosaml2idp'. Ensure you import correctly.
fix
Install with 'pip install djangosaml2idp2', then import as 'djangosaml2idp'.
affects: all
gotchaSAML_IDP_CONFIG must include 'entity_id' and 'acs_endpoint' as full URLs. Missing these causes AttributeError on metadata endpoint.
fix
Ensure both are present and valid HTTPS URLs.
affects: all
Upgrade
Version history
0.9.1latest on PyPI · released Mar 9, 2026
Audit
Dependencies
djangorequiredRequired: Django web framework
pysaml2requiredRequired: SAML library
djangosaml2requiredRequired: SAML integration utilities
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
djangosaml2idp2 — pip install djangosaml2idp2 · libregistry