openid connect client tailore to pyqt and async environments
Project description
herre
DEVELOPMENT
Idea
herre is an (asynchronous) oauth2/openid client, that provides sensible defaults for the python ecosystem
Prerequisites
herre needs a oauth2/opendid server to connect to
Supports
- Authorization Code Flow (PKCE)
- Within a Qt app through a QtWebengine View
- With a Redirect Server
- Client-Credentials Flow
Usage
In order to initialize the Client you need to connect it as a Valid Application with your Arnheim Instance
client = Herre(
grant=AuthorizationCode()
host="p-tnagerl-lab1",
port=8000,
client_id="$YOUR_CLIENT_ID",
client_secret="$YOUR_CLIENT_SECRET",
name="karl",
)
with client:
client.login()
Async usage
client = Herre(
grant=AuthorizationCode()
host="p-tnagerl-lab1",
port=8000,
client_id="$YOUR_CLIENT_ID",
client_secret="$YOUR_CLIENT_SECRET",
name="karl",
)
async with client:
await client.login()
Intergration with Qt
herre fully supports qt-based applications (both PySide2 and PyQt5) and provides a convenient helper class 'QtHerre' as well as a included windowed Authoriation Code Flow (needs pyqtwebengine as additional dependency) as well as browser based logins
class MainWindow(QtWidget)
def __init__(self, *args, **kwargs):
self.herre = QtHerre(
grant=QtWindowAuthorizationCode()
)
Build with
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
herre-0.2.9.tar.gz
(16.3 kB
view hashes)
Built Distribution
herre-0.2.9-py3-none-any.whl
(20.5 kB
view hashes)