scim2-models


Namescim2-models JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/yaal-coop/scim2-models
SummarySCIM2 models serialization and validation with pydantic
upload_time2024-06-16 21:18:24
maintainerNone
docs_urlNone
authorYaal Coop
requires_python<4.0,>=3.9
licenseApache
keywords scim scim2 provisioning pydantic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # scim2-models

[Pydantic](https://docs.pydantic.dev) models for SCIM schemas defined in [RFC7643](https://datatracker.ietf.org/doc/html/rfc7643.html) and [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644.html).

This library provides utilities to parse and produce SCIM2 payloads, and handle them with native Python objects.
It aims to be used as a basis to build SCIM2 servers and clients.

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

## Installation

```shell
pip install scim2-models
```

## Usage

Check the [tutorial](https://scim2-models.readthedocs.io/en/latest/tutorial.html) and the [reference](https://scim2-models.readthedocs.io/en/latest/reference.html) for more details.

```python
from scim2_models import User
import datetime

payload = {
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "id": "2819c223-7f76-453a-919d-413861904646",
    "userName": "bjensen@example.com",
    "meta": {
        "resourceType": "User",
        "created": "2010-01-23T04:56:22Z",
        "lastModified": "2011-05-13T04:42:34Z",
        "version": 'W\\/"3694e05e9dff590"',
        "location": "https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646",
    },
}

user = User.model_validate(payload)
assert user.user_name == "bjensen@example.com"
assert user.meta.created == datetime.datetime(
    2010, 1, 23, 4, 56, 22, tzinfo=datetime.timezone.utc
)
```

scim2-models belongs in a collection of SCIM tools developed by [Yaal Coop](https://yaal.coop),
with [scim2-client](https://github.com/yaal-coop/scim2-client),
[scim2-tester](https://github.com/yaal-coop/scim2-tester) and
[scim2-cli](https://github.com/yaal-coop/scim2-cli)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yaal-coop/scim2-models",
    "name": "scim2-models",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "scim, scim2, provisioning, pydantic",
    "author": "Yaal Coop",
    "author_email": "contact@yaal.coop",
    "download_url": "https://files.pythonhosted.org/packages/40/e5/117307fc73950b08b68be2b98415726d2bec0e604e98aeaeb42b31725cd9/scim2_models-0.1.7.tar.gz",
    "platform": null,
    "description": "# scim2-models\n\n[Pydantic](https://docs.pydantic.dev) models for SCIM schemas defined in [RFC7643](https://datatracker.ietf.org/doc/html/rfc7643.html) and [RFC7644](https://datatracker.ietf.org/doc/html/rfc7644.html).\n\nThis library provides utilities to parse and produce SCIM2 payloads, and handle them with native Python objects.\nIt aims to be used as a basis to build SCIM2 servers and clients.\n\n## What's SCIM anyway?\n\nSCIM stands for System for Cross-domain Identity Management, and it is a provisioning protocol.\nProvisioning is the action of managing a set of resources across different services, usually users and groups.\nSCIM is often used between Identity Providers and applications in completion of standards like OAuth2 and OpenID Connect.\nIt allows users and groups creations, modifications and deletions to be synchronized between applications.\n\n## Installation\n\n```shell\npip install scim2-models\n```\n\n## Usage\n\nCheck the [tutorial](https://scim2-models.readthedocs.io/en/latest/tutorial.html) and the [reference](https://scim2-models.readthedocs.io/en/latest/reference.html) for more details.\n\n```python\nfrom scim2_models import User\nimport datetime\n\npayload = {\n    \"schemas\": [\"urn:ietf:params:scim:schemas:core:2.0:User\"],\n    \"id\": \"2819c223-7f76-453a-919d-413861904646\",\n    \"userName\": \"bjensen@example.com\",\n    \"meta\": {\n        \"resourceType\": \"User\",\n        \"created\": \"2010-01-23T04:56:22Z\",\n        \"lastModified\": \"2011-05-13T04:42:34Z\",\n        \"version\": 'W\\\\/\"3694e05e9dff590\"',\n        \"location\": \"https://example.com/v2/Users/2819c223-7f76-453a-919d-413861904646\",\n    },\n}\n\nuser = User.model_validate(payload)\nassert user.user_name == \"bjensen@example.com\"\nassert user.meta.created == datetime.datetime(\n    2010, 1, 23, 4, 56, 22, tzinfo=datetime.timezone.utc\n)\n```\n\nscim2-models belongs in a collection of SCIM tools developed by [Yaal Coop](https://yaal.coop),\nwith [scim2-client](https://github.com/yaal-coop/scim2-client),\n[scim2-tester](https://github.com/yaal-coop/scim2-tester) and\n[scim2-cli](https://github.com/yaal-coop/scim2-cli)\n",
    "bugtrack_url": null,
    "license": "Apache",
    "summary": "SCIM2 models serialization and validation with pydantic",
    "version": "0.1.7",
    "project_urls": {
        "Documentation": "https://scim2-models.readthedocs.io",
        "Homepage": "https://github.com/yaal-coop/scim2-models",
        "Repository": "https://github.com/yaal-coop/scim2-models"
    },
    "split_keywords": [
        "scim",
        " scim2",
        " provisioning",
        " pydantic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1894d58de4af5f6e5df7bcddd831fae9c91aad3fc265421c95b77474329d63b",
                "md5": "22f8b2951cb6b6f111c549ac553f843d",
                "sha256": "25d435a141ddf29e2eff2f89e4b3d957b7ffaa70f3251049c11573b44a1b037d"
            },
            "downloads": -1,
            "filename": "scim2_models-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22f8b2951cb6b6f111c549ac553f843d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 29467,
            "upload_time": "2024-06-16T21:18:23",
            "upload_time_iso_8601": "2024-06-16T21:18:23.293848Z",
            "url": "https://files.pythonhosted.org/packages/a1/89/4d58de4af5f6e5df7bcddd831fae9c91aad3fc265421c95b77474329d63b/scim2_models-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "40e5117307fc73950b08b68be2b98415726d2bec0e604e98aeaeb42b31725cd9",
                "md5": "505642f1c954f59af8cc9cce4404a098",
                "sha256": "8c62bed44108d206182d0d0a662e9d588f85c2b25decfa91f839129529caa45f"
            },
            "downloads": -1,
            "filename": "scim2_models-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "505642f1c954f59af8cc9cce4404a098",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 23894,
            "upload_time": "2024-06-16T21:18:24",
            "upload_time_iso_8601": "2024-06-16T21:18:24.554615Z",
            "url": "https://files.pythonhosted.org/packages/40/e5/117307fc73950b08b68be2b98415726d2bec0e604e98aeaeb42b31725cd9/scim2_models-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-16 21:18:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yaal-coop",
    "github_project": "scim2-models",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scim2-models"
}
        
Elapsed time: 0.96868s