This package provides a Python SDK for Hydra OAuth2 and OpenID Connect server made in Go.
pip install hydra-sdk
Documentation is still in progress...
from hydra import Hydra
# First, create a Hydra client
hydra = Hydra(host='http://localhost:4444', client='client_id', secret='client_secret')
# Get an access token
token = hydra.get_access_token(scope=['hydra'])
# Get a client
client = hydra.clients.get('admin')
Hydra API coverage is a work in progress. You can check what is already developed in the following list:
- OAuth2
- Get access token (with token cache)
- Introspect token
- Revoke token
- Consent
- Decode consent challenge
- Encode consent response
- Clients
- Create new client
- Retrieve client information
- List all clients
- Update client
- Delete client
- JWK
- Get JWK set
- Generate JWK set
- Upload JWK set
- Delete JWK set
- Get JWK key
- Set JWK key
- Delete JWK key
- Policies
- Create new policy
- Retrieve policy details
- Find policy by subject
- Delete policy
- Warden
- Token access control
- Subject access control
Python Hydra SDK is released under MIT license.