Install & Compatibility
Where this runs
tested against v0.0.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.5MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 31MB
30MB installed
● package 30MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
User
✓ from pydanticscim import User
✗ from pydanticscim import User
Demonstrates how to instantiate a SCIM User object and serialize it to JSON, following the required SCIM schema fields. Note the use of `user.json()` for Pydantic v1 serialization.
from pydantic_scim import User
# Create a SCIM User object adhering to the SCIM Core Schema
user = User(
schemas=["urn:ietf:params:scim:schemas:core:2.0:User"],
userName="bjensen",
name={
"givenName": "Barbara",
"familyName": "Jensen"
},
emails=[
{
"value": "bjensen@example.com",
"type": "work",
"primary": True
}
],
active=True,
externalId="employee-id-123"
)
# Serialize the user object to JSON (using Pydantic v1 .json() method)
print(user.json(indent=2))
Debug
Known issues
breakingpydantic-scim is only compatible with Pydantic v1.x. Installing it with Pydantic v2.x will lead to import errors, validation failures, or unexpected behavior.fixEnsure Pydantic v1.x is installed: `pip install 'pydantic<2.0.0'` or uninstall Pydantic v2 (`pip uninstall pydantic`) before installing Pydantic v1 and pydantic-scim.
affects: All versions of pydantic-scim (0.0.1 - 0.0.8) are strictly `pydantic<2.0.0`.
gotchaSCIM schemas are very strict. Missing required fields (e.g., `schemas`, `userName` for User) or providing incorrect data types will result in Pydantic `ValidationError`.fixAlways consult the SCIM specification (RFC 7643) for required fields and data types, or refer to the `pydantic-scim` source for model definitions. Ensure all mandatory fields are present.
affects: All
gotchaSCIM attribute names are case-sensitive and must match the specification exactly (e.g., `userName`, `givenName`, `familyName`). Python's convention often uses `snake_case`, but SCIM uses `camelCase`.fixUse the exact `camelCase` attribute names as defined in the SCIM specification when initializing models (e.g., `userName`, not `user_name`). pydantic-scim models reflect the SCIM spec directly.
affects: All
Upgrade
Version history
0.0.8latest on PyPI · released Oct 26, 2023
Audit
Dependencies
pydanticrequiredCore dependency for defining data models, strictly requires Pydantic v1.x (<2.0.0).