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.9.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.9.0
File Size Uploaded
scim2_client-0.9.0.tar.gz 24.6 kB Details

Built distribution (wheel)

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

Total release size: 50.8 kB

Release files / scim2_client-0.9.0.tar.gz

Download URL scim2_client-0.9.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ea23fbf6e00925f00ab6fb1ca197f07ba5eaac4c8b997c8ae75dbf04881b2ff3
BLAKE2b-256 checksum
How to use checksums
fb3866f80e10ceb9e4c09d59673db73f6a93447d776e9863b9136f354f6d8599
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 21, 2026.

Transparency log

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

Download URL scim2_client-0.9.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b40b65fb6b74ce17e5dd0164540367f761f86dbcc4818e72f33bad0ea17cdd4
BLAKE2b-256 checksum
How to use checksums
4356045f768efb51a7cf7c517e37690922fffd67bac32d4fbb9fd8722a2a01de
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 21, 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