{"id":8624,"library":"scim2-models","title":"SCIM2 Models","description":"scim2-models is a Python library providing Pydantic models for SCIM (System for Cross-domain Identity Management) schemas, specifically RFC7643 and RFC7644. It facilitates the serialization and validation of SCIM2 payloads using native Python objects. The library includes features like context-aware validation and dynamic schema extensions, serving as a foundational block for building SCIM2 servers and clients. The current version is 0.6.12, and it is actively maintained with frequent releases.","status":"active","version":"0.6.12","language":"python","source_language":"en","source_url":"https://github.com/python-scim/scim2-models","tags":["SCIM","identity management","provisioning","pydantic","validation","schemas","RFC7643","RFC7644"],"install":[{"cmd":"pip install scim2-models","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core dependency for defining and validating SCIM schemas.","package":"pydantic"}],"imports":[{"wrong":"from scim2_models.resources import User","symbol":"User","correct":"from scim2_models import User"},{"symbol":"EnterpriseUser","correct":"from scim2_models import EnterpriseUser"},{"symbol":"BaseModel","correct":"from scim2_models import BaseModel"}],"quickstart":{"code":"from scim2_models.resources import User\nfrom pydantic import ValidationError\n\nuser_data = {\n    \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:User\"],\n    \"userName\": \"bjensen@example.com\",\n    \"id\": \"2819c223-7f76-453a-919d-413861904646\",\n    \"name\": {\n        \"givenName\": \"Babs\",\n        \"familyName\": \"Jensen\"\n    },\n    \"emails\": [\n        {\n            \"value\": \"bjensen@example.com\",\n            \"type\": \"work\",\n            \"primary\": True\n        }\n    ],\n    \"meta\": {\n        \"resourceType\": \"User\",\n        \"created\": \"2024-04-13T12:00:00Z\",\n        \"lastModified\": \"2024-04-13T12:00:00Z\",\n        \"location\": \"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646\"\n    }\n}\n\ntry:\n    user = User.model_validate(user_data)\n    print(f\"Successfully validated user: {user.user_name}\")\n    print(f\"User ID: {user.id}\")\nexcept ValidationError as e:\n    print(f\"Validation error: {e}\")\n\n# You can also create a user directly\nnew_user = User(\n    userName=\"testuser\",\n    emails=[{\"value\": \"test@example.com\", \"type\": \"work\", \"primary\": True}]\n)\nprint(f\"Created new user: {new_user.model_dump_json(indent=2)}\")","lang":"python","description":"This quickstart demonstrates how to validate an existing SCIM User payload against the `User` model and how to construct a new `User` object directly. The `model_validate` method from Pydantic is used for parsing dictionary data, and `model_dump_json` for serialization."},"warnings":[{"fix":"If you have custom SCIM resource models, update them to use `__schema__ = [\"urn:ietf:params:scim:schemas:core:2.0:User\"]` (or your specific URN) as a class variable instead of a default value for a 'schemas' field.","message":"In version 0.6.0, the mechanism for defining schema URNs on custom SCIM resource models changed. Resources now define their schema URN with a `__schema__` class variable instead of a `schemas` default value.","severity":"breaking","affected_versions":">=0.6.0"},{"fix":"Be prepared for potential API adjustments when upgrading, and consult the changelog for details on each new release.","message":"The library is officially marked as '3 - Alpha' status on PyPI. This indicates that the API might still be unstable, and backward-incompatible changes could occur in minor versions without strict adherence to semantic versioning until a stable '1.0' release.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Always consider the SCIM operation context when validating payloads. If validation errors occur unexpectedly, verify that the `context` parameter (if used) correctly reflects the intended SCIM operation.","message":"The library supports context-aware validation (e.g., for creation, query, or replacement operations). This means that validation behavior can differ based on the `context` parameter provided to validation methods. An attribute that is optional during a PUT (replacement) might be required during a POST (creation).","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'0.6.12':68 'activ':72 'awar':47 'block':57 'build':59 'client':63 'context':46 'context-awar':45 'cross':18 'cross-domain':17 'current':65 'domain':19 'dynam':50 'extens':52 'facilit':28 'featur':43 'foundat':56 'frequent':75 'ident':20,78 'includ':42 'librari':9,41 'like':44 'maintain':73 'manag':21,79 'model':2,5,12 'nativ':37 'object':39 'payload':35 'provid':10 'provis':80 'pydant':11,81 'python':8,38 'releas':76 'rfc7643':24,84 'rfc7644':26,85 'schema':22,51,83 'scim':14,77 'scim2':1,4,34,60 'scim2-models':3 'serial':30 'serv':53 'server':61 'specif':23 'system':15 'use':36 'valid':32,48,82 'version':66","created_at":"2026-04-16T17:03:08.725573+00:00","updated_at":"2026-04-16T17:03:08.725573+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.6.12","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/sponsors/python-scim","docs":"https://scim2-models.readthedocs.io","changelog":"https://scim2-models.readthedocs.io/en/latest/changelog.html","pypi":"https://pypi.org/project/scim2-models/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}