scim2-server#

scim2-server serves the SCIM protocol of RFC 7643 and RFC 7644 over a storage that the application chooses. It validates the requests, applies them to the resources, and builds the responses, with scim2-models. The application only reads and writes the resources, in a database or anywhere else.

scim2-server is for projects that need to:

>>> import os
>>> from scim2_server.handler import ScimHandler
>>> from scim2_server.memory import InMemoryStorage
>>> from scim2_server.requests import ScimRequest
>>> from scim2_server.service import ScimService
>>> from scim2_server.utils import load_default_provider

>>> service = ScimService(load_default_provider(), secret=os.environ["SCIM_SECRET"])
>>> handler = ScimHandler(service, InMemoryStorage())
>>> response = handler.handle(
...     ScimRequest(
...         "POST",
...         "https://scim.example/v2",
...         "/Users",
...         headers={"Content-Type": "application/scim+json"},
...         body=b'{"userName": "bjensen"}',
...     )
... )
>>> response.status, response.headers["Location"]
(<HTTPStatus.CREATED: 201>, 'https://scim.example/v2/Users/...')

scim2-server covers four themes. An application uses the ones it needs, and the guides, the explanations and the reference follow the same themes:

pip install scim2-server

Choose a path#

Overview introduces the parts of a SCIM server, from the description of the service to the test server.

How-to guides show how to complete a specific task, such as connecting a database or integrating a web framework.

Explanation gives the reasons behind the design: the split between the service and the storage, the handling of concurrent writes, and the bulk requests.

Reference lists the public API.