Registry / serialization / pydantic-scim

pydantic-scim

JSON →
library0.0.8pypypiunverified

Pydantic-SCIM provides Pydantic models that strictly adhere to the SCIM (System for Cross-domain Identity Management) specification. It allows developers to define, validate, and serialize SCIM resources like Users and Groups, simplifying integration with SCIM-compliant identity providers. The library currently supports Pydantic v1.x.

pip install pydantic-scim
INSTALL
IMPORT
SIG · PYDANTIC-SCIM
P
pydantic-scim
serializationpythonv0.0.8
Install
3.5s avg
Import
Disk
30MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 31.5MB
glibc
py 3.103.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.
fix
Ensure 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`.
fix
Always 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`.
fix
Use 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).
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
pydantic-scim — pip install pydantic-scim · libregistry