skillfed

scim2-models

SCIM2 models serialization and validation with pydantic

scim2-models v0.6.12 254.7K downloads/30d#8,491 on PyPI
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

scim2-models wraps the SCIM2 specification (RFC7643 and RFC7644) in Pydantic v2 models, letting you work with identity provisioning data—users, groups, service provider configs, schemas—as validated Python objects instead of raw JSON. It handles the schema complexity of SCIM2, including field mutability, returned status, uniqueness constraints, and context-aware validation based on HTTP operations (creation, query, replacement, etc.).

The library is designed as a foundation for building SCIM2 servers and clients. It provides native classes for core resources, supports dynamic schema extensions, and includes SCIM message types like ListResponse, SearchRequest, PatchOp, and Error. Validation and serialization are handled by Pydantic, giving you IDE autocompletion and type safety out of the box.

Use it for:

  • Build a SCIM2 identity provider server that accepts user and group provisioning requests from applications.
  • Implement a SCIM2 client that syncs users and groups from a central directory to downstream SaaS applications.
  • Validate incoming SCIM2 payloads in an API gateway or middleware before processing.
  • Generate SCIM2-compliant error responses with automatic conversion from Python exceptions.
  • Define and enforce custom SCIM2 schema extensions for organization-specific user attributes.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Pydantic models for SCIM2 (System for Cross-domain Identity Management) resources, enabling parsing and validation of SCIM2 payloads as native Python objects for building identity provisioning servers and clients.

Yes. The package is actively maintained, has no known vulnerabilities, installs with minimal friction (one dependency), and directly implements the SCIM2 RFCs with Pydantic integration. It is a solid choice if you are building identity provisioning infrastructure. The alpha status reflects ongoing development, but the core functionality is stable and the library is already in use.

Install

scim2-models on PyPI

pip

pip install scim2-models

uv

uv add scim2-models

poetry

poetry add scim2-models

Installing scim2-models

Before you install

Low friction: pure Python wheel with only pydantic as a runtime dependency. Actively maintained with recent releases. Supports Python 3.9–3.13.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects, provided you include a copy of the license and note any changes.

Quickstart

pip install scim2-models

from scim2_models import User

payload = {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "2819c223-7f76-453a-919d-413861904646",
    "userName": "bjensen@example.com",
}

user = User.model_validate(payload)

Requires Python 3.10 or later.

Verify before relying

  • Whether the library handles all SCIM2 extensions and custom resource types in production scenarios.
  • Performance characteristics when validating large batches of SCIM2 payloads.
  • Completeness of error handling and SCIM-compliant exception conversion in edge cases.

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — pydantic
Maintenance actively maintained — 123 days since the last release
First released
Downloads 254,685/month — #8,491 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: scim2_models-0.6.12-py3-none-any.whl

Keywords: scim, scim2, provisioning, pydantic, rfc7643, rfc7644

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

scim2 pydantic modelsidentity provisioning pythonrfc7643 rfc7644 implementationuser group provisioning apiscim2 payload validationcross-domain identity managementscim server client library
identity-provisioningscim2-rfcpydantic-models

More WWW/HTTP packages