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,PatchOpandError - Pydantic 2 models, with validation, serialization and IDE completion
- Validation and serialization per HTTP operation, driven by the SCIM attribute characteristics
required,mutability,returnedanduniqueness - 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
Errorresponses
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.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scim2_models-0.8.1.tar.gz | 92.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scim2_models-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 206.3 kB
Release files / scim2_models-0.8.1.tar.gz
| Download URL | scim2_models-0.8.1.tar.gz |
|---|---|
| Size | 92.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c269153ab252858c125a585565acde2d04be17d2554522315ec5d46d68780c7
|
|
BLAKE2b-256 checksum How to use checksums |
df1c9010838ba60bac4c8ba6b76cbc8c6c74319f12f96e860cb720b0923f403b
|
| 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 25, 2026.
Transparency logRelease files / scim2_models-0.8.1-py3-none-any.whl
| Download URL | scim2_models-0.8.1-py3-none-any.whl |
|---|---|
| Size | 114.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fc5ed3e6ea250a507d7d371c47bf4ade4141788af8fd5af6ae7282e08783b7f
|
|
BLAKE2b-256 checksum How to use checksums |
72594daf3488ec1aa235c38047316a4562f74e29083b73368f5b01833372be36
|
| 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 25, 2026.
Transparency log