scim2-client 0.1.1
pip install scim2-client==0.1.1
Newer version available (0.5.1)
Released:
Pythonically build SCIM requests and parse SCIM responses
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: Yaal Coop
- Tags scim, scim2, provisioning, httpx, api
- Requires: Python <4.0, >=3.9
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
Project description
scim2-client
A SCIM client Python library built upon scim2-models and httpx, that pythonically build requests and parse responses, following the RFC7643 and RFC7644 specifications.
Installation
pip install scim2-client
Usage
Check the tutorial and the reference for more details.
Here is an example of usage:
import datetime
from httpx impont Client
from scim2_models import User, EnterpriseUserUser, Group, Error
from scim2_client import SCIMClient
client = Client(base_url=f"https://auth.example/scim/v2", headers={"Authorization": "Bearer foobar"})
scim = SCIMClient(client, resource_types=(User[EnterpriseUser], Group))
# Query resources
user = scim.query(User, "2819c223-7f76-453a-919d-413861904646")
assert user.user_name == "bjensen@example.com"
assert user.meta.last_updated == datetime.datetime(
2024, 4, 13, 12, 0, 0, tzinfo=datetime.timezone.utc
)
# Update resources
user.display_name = "Babes Jensen"
user = scim.replace(user)
assert user.display_name == "Babes Jensen"
assert user.meta.last_updated == datetime.datetime(
2024, 4, 13, 12, 0, 30, tzinfo=datetime.timezone.utc
)
# Create resources
response = scim.create(User, "2819c223-7f76-453a-919d-413861904646")
assert isinstance(response, Error)
assert response.detail == "One or more of the attribute values are already in use or are reserved."
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIMeta
- License: MIT License (MIT)
- Author: Yaal Coop
- Tags scim, scim2, provisioning, httpx, api
- Requires: Python <4.0, >=3.9
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scim2_client-0.1.1.tar.gz
.
File metadata
- Download URL: scim2_client-0.1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.2-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4367829d1d0c330f8511839d546b84ea70f2df228262b7ed188f95fbbf54263 |
|
MD5 | 73424d8442f695ea35d6e4ff5f5fbe2a |
|
BLAKE2b-256 | daada40fa548264ec075ec7e80ece981de54f89d92e26b0b3504a2641bee66f5 |
File details
Details for the file scim2_client-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: scim2_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.9.2-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a26bb87ef72ea4c5756a04482ad3e9da6ae754b369d4d63995e2cb81236b24 |
|
MD5 | c508aaae3dfbbd62b4d3e91e365a3b5d |
|
BLAKE2b-256 | ffc7a16266e41e70c346a5859d6ef95edae0127175606305b5f6e96e9e2d31df |