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.11.1

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.11.1
File Size Uploaded
scim2_client-0.11.1.tar.gz 33.0 kB Details

Built distribution (wheel)

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

Total release size: 66.8 kB

Release files / scim2_client-0.11.1.tar.gz

Download URL scim2_client-0.11.1.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
630d2d8dbc6f40d163dfac1849cc7ad53ab6a4c87cc1b5b14f8d3d424ff9546e
BLAKE2b-256 checksum
How to use checksums
168850b45ac11b460f8927071f9ebfba3c4c71999de890f5c807a47a63240ff1
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 Oct 1, 2026.

Transparency log

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

Download URL scim2_client-0.11.1-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5520f83b285d8f86d204b934524657aa880dd48090e479a288307f12fa966e92
BLAKE2b-256 checksum
How to use checksums
fc0d0b8f8a884b442d52b662d0061ca8ca8709d7e327525c36ba38e8c84add3b
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 Oct 1, 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