Skip to main content

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:

  1. EXTRASUITE_SERVER_URL=https://your-server.example.com
  2. ~/.config/extrasuite/gateway.json containing {"EXTRASUITE_SERVER_URL": "https://your-server.example.com"}
  3. CredentialsManager(server_url="https://your-server.example.com")
  4. 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

  1. CredentialsManager opens GET /api/token/auth?port=<port> in the browser when no valid session exists
  2. The browser is redirected to localhost with a short-lived auth code
  3. The client exchanges that code at POST /api/auth/session/exchange
  4. The returned session token is stored in ~/.config/extrasuite/session.json
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extrasuite-0.9.0.tar.gz (121.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extrasuite-0.9.0-py3-none-any.whl (306.8 kB view details)

Uploaded Python 3

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

Hashes for extrasuite-0.9.0.tar.gz
Algorithm Hash digest
SHA256 145dd12784f9be78bc93edcdae3b83cc086686118037926d1dfec26e4024c123
MD5 5e98b49c0638a00be22ca8ace300fe96
BLAKE2b-256 d6d134348a8bfed6640ef4ea2caa87f7aeab70f94da39e43f8827701d09dbe48

See more details on using hashes here.

Provenance

The following attestation bundles were made for extrasuite-0.9.0.tar.gz:

Publisher: publish-extrasuite.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for extrasuite-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8829408164beefdf949d359421450406e93c9a869d1d454c96a92262289f08a
MD5 219577c5ca99b9b3983f186b8cabe218
BLAKE2b-256 cdc0bdff508b712d2504021da8aa023706ec268c18cdb09c59c3710bfb0af6b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for extrasuite-0.9.0-py3-none-any.whl:

Publisher: publish-extrasuite.yml on think41/extrasuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page