Skip to main content

scim2-client

A SCIM client Python library built upon scim2-models , that pythonically build requests and parse responses, following the RFC7643 and RFC7644 specifications. You can use whatever request engine you prefer to perform network requests, but scim2-client comes with httpx2 support.

It aims to be used in SCIM client applications, or in unit tests for SCIM server applications.

What's SCIM anyway?

SCIM stands for System for Cross-domain Identity Management, and it is a provisioning protocol. Provisioning is the action of managing a set of resources across different services, usually users and groups. SCIM is often used between Identity Providers and applications in completion of standards like OAuth2 and OpenID Connect. It allows users and groups creations, modifications and deletions to be synchronized between applications.

Features

  • CRUD Operations: create, query, replace, delete methods for SCIM resources
  • PATCH Support: Partial resource modifications with add, remove and replace operations
  • Server Discovery: Automatic retrieval of ServiceProviderConfig, ResourceTypes and Schemas
  • Search & Filtering: Support for SCIM filters, sorting, pagination and attribute selection
  • Sync & Async: Both synchronous and asynchronous clients available
  • Multiple HTTP Engines: Built-in support for httpx2 (sync/async) and werkzeug (testing). Adaptable to any network engine.
  • Request & Response Validation: Automatic payload validation against SCIM schemas
  • Error Handling: Structured exceptions for network, request and response errors

Installation

pip install scim2-client[httpx2]

Usage

Check the tutorial and the reference for more details.

Here is an example of usage:

import datetime
from httpx2 import Client
from scim2_client.engines.httpx2 import SyncSCIMClient
from scim2_models import SCIMException

client = Client(
    base_url="https://auth.example/scim/v2", headers={"Authorization": "Bearer foobar"}
)
scim = SyncSCIMClient(client)
scim.discover()
User = scim.get_resource_model("User")

# Query resources
user = scim.query(User, "2819c223-7f76-453a-919d-413861904646")
assert user.user_name == "bjensen@example.com"
assert user.meta.last_modified == datetime.datetime(
    2024, 4, 13, 12, 0, 0, tzinfo=datetime.timezone.utc
)

# Update resources
user.display_name = "Babs Jensen"
user = scim.replace(user)
assert user.display_name == "Babs Jensen"
assert user.meta.last_modified == datetime.datetime(
    2024, 4, 13, 12, 0, 30, tzinfo=datetime.timezone.utc
)

# Create resources
user = User(user_name="bjensen@example.com")
try:
    scim.create(user)
except SCIMException as exc:
    error = exc.to_error()
    assert (
        error.detail
        == "One or more of the attribute values are already in use or are reserved."
    )

scim2-client belongs in a collection of SCIM tools developed by Yaal Coop, with scim2-models, scim2-tester and scim2-cli

Metadata

Release files for scim2-client 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scim2-client 0.8.0
File Size Uploaded
scim2_client-0.8.0.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scim2-client 0.8.0
File Interpreter ABI Platform
scim2_client-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.3 kB

Release files / scim2_client-0.8.0.tar.gz

Download URL scim2_client-0.8.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b807b51f38db0f519b74873024c7efbbebcbe79fc3c688cc2a8ef82a2a497c28
BLAKE2b-256 checksum
How to use checksums
5aa6f31df435773d1399cdeabd9a6a697d69c0c83917746a7ccd8aff70dd9e49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / scim2_client-0.8.0-py3-none-any.whl

Download URL scim2_client-0.8.0-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25934fe9a3f08bde13749ddc87da1405a40390c92262021df4b4b8c4eda7662c
BLAKE2b-256 checksum
How to use checksums
86ed28235414f6fd5c5dbd336937f93182ebcf08e63806f2f5cc7dde58cd0def
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page