Skip to main content

scim2-models

Pydantic models for the SCIM schemas and protocol defined in RFC7643 and RFC7644. 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
  • SCIM exceptions, convertible to Error responses

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.

Release files for scim2-models 0.9.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-models 0.9.0
File Size Uploaded
scim2_models-0.9.0.tar.gz 96.1 kB Details

Built distribution (wheel)

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

Total release size: 214.6 kB

Release files / scim2_models-0.9.0.tar.gz

Download URL scim2_models-0.9.0.tar.gz
Size 96.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a0b35178a2c03ca0b59300ce3c7724857fb9049dbf7f3b106b6696d32d0ae3cb
BLAKE2b-256 checksum
How to use checksums
e625a7722642f8420ecc0f9c4c271901b43208c263d64b1d7c0a1ed76cdfa661
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 Sep 27, 2026.

Transparency log

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

Download URL scim2_models-0.9.0-py3-none-any.whl
Size 118.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
934d11e7386edd2e0a682dfb279915c74d9f7b3027daf5333794a30bb7f813eb
BLAKE2b-256 checksum
How to use checksums
3bf959cf15d896064e50e1a7b2f7570c4bc5fbe1071816d29f959456487ad617
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 Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.0 This release

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