Skip to content

About

Painless SCIM integration for SQLAlchemy

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

scim2-sqlalchemy

Store SCIM resources in the tables of an application, with the SQLAlchemy ORM.

A mapping declares which column holds each SCIM attribute. A storage then reads, writes, filters, sorts and pages the resources for scim2-server, which serves the SCIM protocol of RFC 7643 and RFC 7644.

from scim2_models import User
from scim2_sqlalchemy import Many, ResourceMapping, SqlAlchemyStorage

users = ResourceMapping(
    User,
    Account,
    {
        "id": Account.id,
        "userName": Account.login,
        "name.givenName": Account.first_name,
        "emails": Many(Account.emails, {"value": EmailAddress.address}),
        "meta.created": Account.created_at,
        "meta.lastModified": Account.updated_at,
    },
    version=Account.revision,
)
storage = SqlAlchemyStorage({"User": users}, lambda: session)

Installation

$ pip install scim2-sqlalchemy

The asynchronous storage needs the asyncio extra:

$ pip install "scim2-sqlalchemy[asyncio]"

Documentation

The documentation builds a SCIM server over existing tables, and describes the mappings, the transactions and the public API.

Contributing

Read the contributing guide.

License

scim2-sqlalchemy is published under the terms of the Apache 2.0 license.

About

Painless SCIM integration for SQLAlchemy

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages