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:

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

>>> handler = ScimHandler(ScimService(load_default_provider()), 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/...')

The library has four layers. An application uses as many as it needs:

The scim2-server command serves a test server.

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.

Test server runs a SCIM server from the command line, for the tests of a SCIM client in any language.