Python client for forge-dashboard's REST API
Actively maintained. Last release 3 days ago, commits in 11 of the last 26 weeks. A safe choice.
pip install forge-dashboard-sdkforge-dashboard-sdk-python
A Python client for forge-dashboard's REST API, generated from its OpenAPI spec with openapi-python-client. It saves you from hand-rolling HTTP requests, auth and retries against the API yourself.
Requirements
- Python 3.12 or later.
- A running forge-dashboard instance.
- A personal API token for that instance (see "Authentication" below) —
every endpoint except
healthand the two webhook receivers needs one.
Installation
pip install forge-dashboard-sdk
Pin an exact version in your own pyproject.toml/requirements.txt rather
than tracking the latest release in anything but a quick trial.
Authentication
forge-dashboard accepts either a browser's passkey session cookie or a
personal API token — Authorization: Bearer <token> — as an alternative
that needs no WebAuthn ceremony. This SDK only speaks the token half, the
one a script can actually use. Mint one by signing into the dashboard once
and calling POST /api/v1/tokens, then pass it to ForgeDashboardClient or
set FORGE_DASHBOARD_API_TOKEN in the environment:
import os
from forge_dashboard import ForgeDashboardClient
client = ForgeDashboardClient(
"https://forge-dashboard.example.com",
api_token=os.environ.get("FORGE_DASHBOARD_API_TOKEN"),
)