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
  • Bulk Operations: Multiple operations sent in a single request with the bulk method
  • 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

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."
    )

Documentation

Contributing

The contribution page describes how to run the tests, the style checks and the documentation build.

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.10.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.10.0
File Size Uploaded
scim2_client-0.10.0.tar.gz 26.3 kB Details

Built distribution (wheel)

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

Total release size: 54.2 kB

Release files / scim2_client-0.10.0.tar.gz

Download URL scim2_client-0.10.0.tar.gz
Size 26.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d4d02af0575f64c1f22b82bb3e1d170d9b5fe3eeeabe34847ad24a8f7f1a2276
BLAKE2b-256 checksum
How to use checksums
7368117e758b4ca42a203ff16b013f0f31b96fd7b1989c6f327344dc9563585e
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 27, 2026.

Transparency log

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

Download URL scim2_client-0.10.0-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbb3136df1b68770832590338df9c92e9c003ae3bef893f2aa7adcc09ba5c275
BLAKE2b-256 checksum
How to use checksums
5498a7d54024f3b5f6747e3fd08c4d6153d90110c295af1b30514d832af40202
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 27, 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