scim2-models#
scim2-models represents the resources and messages of the SCIM protocol as Pydantic models, and applies the validation and serialization rules of RFC 7643, RFC 7644 and RFC 9865 to them. A client or a server uses it to parse the payloads it receives, and to produce the ones it sends.
>>> from scim2_models import Context, User
>>> user = User.model_validate(
... {
... "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
... "id": "2819c223-7f76-453a-919d-413861904646",
... "userName": "bjensen",
... },
... scim_ctx=Context.RESOURCE_QUERY_RESPONSE,
... )
>>> user.user_name
'bjensen'
It provides no HTTP endpoint, no persistence and no authorization: those belong to the application, and the integrations show how to wire them together.
It does not (yet) implement the other SCIM RFCs: RFC 9944 (device schema extensions) and RFC 9967 (security event tokens). You can still define a device resource with a custom model.
pip install scim2-models
Choose a path#
Overview gives a broad tour of the models and the operations used by SCIM clients and servers.
How-to guides show how to complete a specific task, such as accessing a resource value with a SCIM path.
Explanation gives the reasons behind the behavior of the library, and the SCIM rules it applies.
Integrations shows how to build a SCIM server with Flask, Django, FastAPI or SQLAlchemy.
Reference lists the complete public API.