Skip to main content
python-scim logo

scim2-django

Serve a SCIM 2.0 server from a Django project, as RFC7643 and RFC7644 define it. It is built upon scim2-server and scim2-models. It stores the resources in the models of your project.

Features

  • Storage in the models of your project, with filters, sorts and pages run in the database, on SQLite, PostgreSQL and MariaDB
  • manage.py check checks the mappings between SCIM attributes and model fields
  • The users and the groups of django.contrib.auth served without any table, and a model beside them for externalId, meta.lastModified and the attributes of your project
  • Resource endpoints: POST, GET, PUT, PATCH and DELETE, for every resource type
  • Search: GET and POST /.search, per resource type and at the server root
  • Discovery endpoints: /ServiceProviderConfig, /ResourceTypes and /Schemas
  • Bulk operations: POST /Bulk, with bulkId references, failOnErrors, maxOperations and maxPayloadSize
  • /Me, once your project tells which resource belongs to the authenticated client
  • Conditional requests with ETags: If-Match and If-None-Match
  • SCIM error payloads for every failure
  • Several SCIM servers in one project, each with its own URL namespace

Example

# urls.py
from django.urls import path
from scim2_models import ResourceType, ScimProvider, User

from scim2_django import ScimSite
from scim2_django.storage import DjangoStorage, ResourceMapping

from accounts.models import Account

USERS = ResourceMapping(
    User,
    Account,
    {
        "id": "id",
        "userName": "login",
        "meta.created": "created_at",
        "meta.lastModified": "updated_at",
    },
    version="revision",
)


def authenticate(request): ...


provider = ScimProvider.from_discovery(
    USERS.schemas(), [ResourceType.from_resource(User)]
)
storage = DjangoStorage({"User": USERS}, provider)
site = ScimSite(storage, provider, authenticate=authenticate)

urlpatterns = [
    path("scim/v2/", site.urls),
]

Installation

pip install scim2-django

Documentation

  • Overview builds a SCIM server over the models of an existing project.
  • How-to guides cover authentication, URLs, reverse proxies, request sizes and transactions.
  • Reference lists the public API and the system checks.

What's SCIM anyway?

SCIM stands for System for Cross-domain Identity Management, and it is a provisioning protocol. Provisioning is the action of managing a set of resources across different services, usually users and groups. SCIM is often used between Identity Providers and applications, alongside standards like OAuth2 and OpenID Connect. It synchronizes the creation, modification and deletion of users and groups between applications.

Getting help

Questions and bug reports go to the issue tracker.

Contributing

The contribution page describes how to run the tests, the style checks and the documentation build.

License

scim2-django is released under the Apache-2.0 license.

scim2-django belongs in a collection of SCIM tools developed by Yaal Coop, with scim2-models, scim2-client, scim2-server, scim2-tester and scim2-cli.

Metadata

Release files for scim2-django 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scim2-django 0.2.0
File Size Uploaded Provenance Actions
scim2_django-0.2.0.tar.gz 52.8 kB With provenance Details for scim2_django-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scim2-django 0.2.0
File Interpreter ABI Platform Actions
scim2_django-0.2.0-py3-none-any.whl Python 3 none any Details for scim2_django-0.2.0-py3-none-any.whl

Total release size: 109.7 kB

Release files / scim2_django-0.2.0.tar.gz

Download URL scim2_django-0.2.0.tar.gz
Size 52.8 kB
Tags Source
SHA-256 checksum
How to use checksums
647d890b9cb3e14aabdb17b10060bf66cda65dd3f03784211f9709d26a8cd546
BLAKE2b-256 checksum
How to use checksums
43699b9c9db9b680a831b9a750924333dc924ad93f0c1f45ce6eb16dc6eccf83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / scim2_django-0.2.0-py3-none-any.whl

Download URL scim2_django-0.2.0-py3-none-any.whl
Size 56.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28235c7e73fdcfeb09f2d73ad10450a376c9f718f9ff52779420253cfceb8b90
BLAKE2b-256 checksum
How to use checksums
68385446587f32578024d7e4a624627a1c1dfa5161d2740ddca7210e9a49660d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for scim2-django 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scim2_django-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page