Metadata-Version: 2.1
Name: qotto-auth-client
Version: 1.0.1a1
Summary: Qotto/QottoAuthClient
Author: Qotto Dev Team
Author-email: dev@qotto.net
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: PyJWT (>=2.0.0)
Requires-Dist: cryptography (>=37.0.0)
Requires-Dist: eventy (>=3.1.0)
Requires-Dist: gql[requests] (>=2.0.0)
Requires-Dist: requests (>=2.0.0)
Description-Content-Type: text/markdown

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

```python
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.
