This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.2.1 instead.
Reason given by maintainers: Includes breaking changes
obi-auth
obi-auth is a library for retrieving Keycloak access tokens interactively. It helps developers and testers quickly authenticate against Keycloak without writing scripts or configuring complex clients.
[!CAUTION] obi-auth is designed to be used interactively and should not be used within a service or application.
Installation
Basic Installation
pip install obi-auth
Notebook Support
For enhanced Jupyter notebook support with Rich display integration:
pip install obi-auth[notebook]
This installs rich which provides better rendering in Jupyter notebooks.
Examples
from obi_auth import get_token
access_token = get_token(environment="staging")
access_token = get_token(environment="staging", token_provider="auth_manager")
CLI
After installation, the obi-auth command is available. Run obi-auth --help for the full list of commands and options.
get-token
Authenticate and print the access token to stdout. Output is a single token string, suitable for piping into other commands.
obi-auth get-token
obi-auth get-token -e production -m daf
obi-auth get-token -p auth_manager
obi-auth get-token --force-refresh
| Option | Description |
|---|---|
-e, --environment |
Target environment: staging (default) or production |
-m, --auth-mode |
Authentication method: pkce (default) or daf |
-p, --token-provider |
Token issuer: keycloak (default) or auth_manager |
--force-refresh |
Clear the cached token and authenticate again |
decode-token
Decode a JWT and print the payload as indented JSON. Pass the token as an argument or via stdin.
obi-auth decode-token eyJhbGciOi...
obi-auth get-token | obi-auth decode-token
obi-auth get-token | obi-auth decode-token | jq -r '.sub'
get-user-info
Authenticate, fetch user info from Keycloak, and print the result as indented JSON.
obi-auth get-user-info
obi-auth get-user-info -e production -m daf
obi-auth get-user-info -p auth_manager
obi-auth get-user-info --force-refresh
obi-auth get-user-info | jq -r '.sub'
| Option | Description |
|---|---|
-e, --environment |
Target environment: staging (default) or production |
-m, --auth-mode |
Authentication method: pkce (default) or daf |
-p, --token-provider |
Token issuer: keycloak (default) or auth_manager |
--force-refresh |
Clear the cached token and authenticate again |
Global options
| Option | Description |
|---|---|
--log-level |
Logging level: DEBUG, INFO, WARNING (default), ERROR, CRITICAL |
License
Copyright (c) 2025 Open Brain Institute
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Metadata
Release files for obi-auth 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| obi_auth-1.2.0.tar.gz | 29.2 kB | Details |
Release files / obi_auth-1.2.0.tar.gz
| Download URL | obi_auth-1.2.0.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
766f614348448d79b5803def760b6e02f54d2652ae78726e3429694ad318ec41
|
|
BLAKE2b-256 checksum How to use checksums |
5b89da8570ac43f94b1b5f821f1d970d609211131aacc2ad360227334309273f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency log