Skip to main content

scim2-models

Pydantic models for the SCIM 2.0 schemas and protocol. It parses and produces SCIM payloads as native Python objects, and serves as a basis for SCIM servers and clients.

Features

  • Models for the resources and messages of RFC 7643 and RFC 7644: User, Group, EnterpriseUser, Schema, ResourceType, ServiceProviderConfig, ListResponse, SearchRequest, PatchOp and Error
  • Pydantic 2 models, with validation, serialization and IDE completion
  • Validation and serialization per HTTP operation, driven by the SCIM attribute characteristics required, mutability, returned and uniqueness
  • SCIM filters and paths: parsing, validation against a model, and evaluation on resources
  • PATCH operations applied to a resource, with the SCIM path grammar
  • Schema extensions, and conversion between SCIM schemas and Python models
  • Cursor-based pagination of RFC 9865
  • SCIM exceptions, convertible to Error responses

Standards

scim2-models implements:

It does not implement the other SCIM RFCs (yet):

  • RFC9944 (device schema extensions).
  • RFC9967 (security event tokens).

Example

from scim2_models import User
import datetime

payload = {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "2819c223-7f76-453a-919d-413861904646",
    "userName": "bjensen@example.com",
    "meta": {
        "resourceType": "User",
        "created": "2010-01-23T04:56:22Z",
        "lastModified": "2011-05-13T04:42:34Z",
        "version": 'W\\/"3694e05e9dff590"',
        "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646",
    },
}

user = User.model_validate(payload)
assert user.user_name == "bjensen@example.com"
assert user.meta.created == datetime.datetime(
    2010, 1, 23, 4, 56, 22, tzinfo=datetime.timezone.utc
)

Installation

pip install scim2-models

Documentation

  • Overview tours the models and the operations used by SCIM clients and servers.
  • How-to guides cover focused tasks.
  • Explanation covers the SCIM rules and the choices behind them.
  • Integrations build a SCIM server with Flask, Django, FastAPI or SQLAlchemy.
  • Reference lists the public API.

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 in completion of standards like OAuth2 and OpenID Connect. It allows users and groups creations, modifications and deletions to be synchronized 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-models is released under the Apache-2.0 license.

scim2-models belongs in a collection of SCIM tools developed by Yaal Coop, with scim2-client, scim2-tester and scim2-cli. It started as a fork of pydantic-scim, to bring support for Pydantic 2.

Metadata

Release files for scim2-models 0.10.4

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-models 0.10.4
File Size Uploaded
scim2_models-0.10.4.tar.gz 103.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scim2-models 0.10.4
File Interpreter ABI Platform
scim2_models-0.10.4-py3-none-any.whl Python 3 none any Details

Total release size: 228.7 kB

Release files / scim2_models-0.10.4.tar.gz

Download URL scim2_models-0.10.4.tar.gz
Size 103.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6847538e538959a5ca7648e406bb8da9bb5c0283716d8baf849c627c915cf83d
BLAKE2b-256 checksum
How to use checksums
e76bc0cf34e21be14ec5c6aa9bd848c234b8daa87ee11ccd4f3e5f93abeaf2d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 6, 2026.

Transparency log

Release files / scim2_models-0.10.4-py3-none-any.whl

Download URL scim2_models-0.10.4-py3-none-any.whl
Size 125.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de097296e955c7ea515fd84e7cf265bcbc27791aeec9cfb1af6e6bcb5be8a8cb
BLAKE2b-256 checksum
How to use checksums
3c24721cf4c26290cd0429e8e1dbb48908093729b967ae5b9e26a9057d1c5649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.4 This release

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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