Client library for ExtraSuite - secure OAuth token exchange for CLI tools
Project description
extrasuite
Python client library for ExtraSuite's v2 session-token authentication flow.
Installation
pip install extrasuite
Configuration
Use one of these:
EXTRASUITE_SERVER_URL=https://your-server.example.com~/.config/extrasuite/gateway.jsoncontaining{"EXTRASUITE_SERVER_URL": "https://your-server.example.com"}CredentialsManager(server_url="https://your-server.example.com")CredentialsManager(service_account_path="/path/to/service-account.json")
Programmatic Usage
from extrasuite.client import CredentialsManager
manager = CredentialsManager(server_url="https://your-server.example.com")
credential = manager.get_credential(
command={"type": "sheet.pull", "file_url": "https://docs.google.com/..."},
reason="User asked to inspect the spreadsheet",
)
print(credential.kind)
print(credential.service_account_email)
print(credential.expires_in_seconds())
Session Flow
CredentialsManageropensGET /api/token/auth?port=<port>in the browser when no valid session exists- The browser is redirected to localhost with a short-lived auth code
- The client exchanges that code at
POST /api/auth/session/exchange - The returned session token is stored in
~/.config/extrasuite/session.json - Each command exchanges the session token at
POST /api/auth/token
Credential cache files are stored under ~/.config/extrasuite/credentials/.
Service Account Mode
For non-interactive environments:
from extrasuite.client import CredentialsManager
manager = CredentialsManager(service_account_path="/path/to/service-account.json")
This mode requires:
pip install google-auth
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extrasuite-0.9.0.tar.gz.
File metadata
- Download URL: extrasuite-0.9.0.tar.gz
- Upload date:
- Size: 121.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
145dd12784f9be78bc93edcdae3b83cc086686118037926d1dfec26e4024c123
|
|
| MD5 |
5e98b49c0638a00be22ca8ace300fe96
|
|
| BLAKE2b-256 |
d6d134348a8bfed6640ef4ea2caa87f7aeab70f94da39e43f8827701d09dbe48
|
Provenance
The following attestation bundles were made for extrasuite-0.9.0.tar.gz:
Publisher:
publish-extrasuite.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extrasuite-0.9.0.tar.gz -
Subject digest:
145dd12784f9be78bc93edcdae3b83cc086686118037926d1dfec26e4024c123 - Sigstore transparency entry: 1282840579
- Sigstore integration time:
-
Permalink:
think41/extrasuite@49ef34d8ee7a94ac10f21681f1cf159dd9bd8742 -
Branch / Tag:
refs/tags/extrasuite-v0.9.0 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extrasuite.yml@49ef34d8ee7a94ac10f21681f1cf159dd9bd8742 -
Trigger Event:
push
-
Statement type:
File details
Details for the file extrasuite-0.9.0-py3-none-any.whl.
File metadata
- Download URL: extrasuite-0.9.0-py3-none-any.whl
- Upload date:
- Size: 306.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8829408164beefdf949d359421450406e93c9a869d1d454c96a92262289f08a
|
|
| MD5 |
219577c5ca99b9b3983f186b8cabe218
|
|
| BLAKE2b-256 |
cdc0bdff508b712d2504021da8aa023706ec268c18cdb09c59c3710bfb0af6b1
|
Provenance
The following attestation bundles were made for extrasuite-0.9.0-py3-none-any.whl:
Publisher:
publish-extrasuite.yml on think41/extrasuite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extrasuite-0.9.0-py3-none-any.whl -
Subject digest:
f8829408164beefdf949d359421450406e93c9a869d1d454c96a92262289f08a - Sigstore transparency entry: 1282840584
- Sigstore integration time:
-
Permalink:
think41/extrasuite@49ef34d8ee7a94ac10f21681f1cf159dd9bd8742 -
Branch / Tag:
refs/tags/extrasuite-v0.9.0 - Owner: https://github.com/think41
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-extrasuite.yml@49ef34d8ee7a94ac10f21681f1cf159dd9bd8742 -
Trigger Event:
push
-
Statement type: