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.8.1.tar.gz (114.0 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.8.1-py3-none-any.whl (299.5 kB view details)

Uploaded Python 3

File details

Details for the file extrasuite-0.8.1.tar.gz.

File metadata

  • Download URL: extrasuite-0.8.1.tar.gz
  • Upload date:
  • Size: 114.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extrasuite-0.8.1.tar.gz
Algorithm Hash digest
SHA256 ab4f7af4b1ec24063cab1d56cb754230b9028f82356c3b0c32007252b6f83a77
MD5 e9033da701c949655e96ae9040735621
BLAKE2b-256 ffd665630eb320c0ac5ae566c847acd4e7b1a4023a903237f6a1cb9bddac4448

See more details on using hashes here.

Provenance

The following attestation bundles were made for extrasuite-0.8.1.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.8.1-py3-none-any.whl.

File metadata

  • Download URL: extrasuite-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 299.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for extrasuite-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df1636611164dc678e9ca872d3a9ab9d6c36cc4b9f4cf18c96d2a6d6818020f6
MD5 e88dc51f3725c58a5655afb5910a494b
BLAKE2b-256 1c58bbe3d815bba5459d75e6b097f753d9f78592879a250acfbce7578ba09ce7

See more details on using hashes here.

Provenance

The following attestation bundles were made for extrasuite-0.8.1-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