Skip to main content
python-scim logo

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.
  • 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.12.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.12.4
File Size Uploaded Provenance Actions
scim2_models-0.12.4.tar.gz 113.7 kB With provenance Details for scim2_models-0.12.4.tar.gz

Built distribution (wheel)

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

Total release size: 245.9 kB

Release files / scim2_models-0.12.4.tar.gz

Download URL scim2_models-0.12.4.tar.gz
Size 113.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3cfaafbe49d6daa61b63afe0f0536774e7543218eaa222164ccb95ecb8871aa
BLAKE2b-256 checksum
How to use checksums
f2afbb485af5b4c024cdfe5be833daf57aee438e54fa5acc9a9ad1a3f210ccdc
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 Oct 29, 2026.

Transparency log

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

Download URL scim2_models-0.12.4-py3-none-any.whl
Size 132.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d219558358557a674e0a5b85f6d11cb2cd8cdf3182c4942df0956891be052e8e
BLAKE2b-256 checksum
How to use checksums
e5312f7a5618a84edc60508aaa92b4228f83424c9e993e90e224cae5a252baa3
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 Oct 29, 2026.

Transparency log

Security for scim2-models 0.12.4

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_models-0.12.4.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 Oct 29, 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.

Release history Release notifications | RSS feed

This release

0.12.4 This release

2 release files Full provenance

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