Skip to main content

Qotto/QottoAuthClient

Project description

Qotto Auth Client

The python package qotto-auth-client is a client for the API qotto-auth which will soon be open sourced.

It allows to manage a scoped permission and authentication system.

More information coming soon...

Quickstart

The QottoAuthApi class allows to interact with a qotto-auth GraphQL server.

from qottoauth import (
    QottoAuthService,
    QottoAuthApi,
    QottoAuthGrapheneApi,
    QottoAuthTestApi,
)

# Create a QottoAuthApi instance
api: QottoAuthApi
if TEST:
    # for offline testing
    api = QottoAuthTestApi()
else:
    # qotto-auth server running
    api = QottoAuthGrapheneApi(
        url=QOTTO_AUTH_URL,
    )

# Create a QottoAuthService instance
service = QottoAuthService(
    api=api,
)

# Register this application
service.register_application(
    application_name=APPLICATION_NAME,
    application_description=APPLICATION_DESCRIPTION,
)

# ...

You can extend the QottoAuthService class to add your own business logic.

In the current version (1.0.1), QottoAuthTestApi does not provide all queries and mutations, so you might need to extend the class if you need to test beahviour depending on these queries and mutations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qotto-auth-client-1.1.3.tar.gz (13.4 kB view hashes)

Uploaded Source

Built Distribution

qotto_auth_client-1.1.3-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page