UTC --:--:--
Docs·SDKs·Python

Python SDK · goable-sdk

A thin, fully-typed httpx transport over the public API — it mirrors the TypeScript client 1:1 (snake_case methods), and the request/ response types are pydantic v2 models generated from the live OpenAPI contract. It covers 100% of the public API surface: scoring, recommend-spot, decision, counterfactual explain, intelligence, underwriting, observations, and outcomes.

Install

pip install goable-sdk

v0.1.0, MIT licensed, on PyPI (pypi.org/project/goable-sdk). Requires Python 3.10+ and is built on httpx and pydantic v2. Source + the full method list: github.com/goable-io/python-sdk.

Quickstart

import os
from goable_sdk import GoableClient

goable = GoableClient(api_key=os.environ["GOABLE_API_KEY"])

result = goable.score({
 "location": {"lat": 36.013, "lng": -5.604},
 "activity": "kitesurfing",
 "window": {"from": "2026-05-23T09:00Z", "to": "2026-05-23T18:00Z" },
})

print(result.score, result.verdict)

Authentication

The constructor takes your key plus optional transport overrides. See Authentication for how keys work.

GoableClient(
 api_key, # required — sent as X-Goable-Key
 *,
 base_url=..., # default https://api.goable.io
 timeout=30.0, # seconds; 0 or None disables
 client=..., # inject an httpx.Client (tests)
)

Methods

MethodEndpoint
score(req)POST /v1/score
score_series(req)POST /v1/score/series
score_multi(req)POST /v1/score/multi
score_portfolio(req)POST /v1/score/portfolio
score_historical(req)POST /v1/score/historical
projections(req)POST /v1/projections
decision(req)POST /v1/decision
recommend_spot(req)POST /v1/recommend-spot
explain_counterfactual(req)POST /v1/score/explain-counterfactual
explain(req)POST /v1/intelligence/explain
briefing(req)POST /v1/intelligence/briefing
quote(req)POST /v1/underwriting/quote
bind_policy(req)POST /v1/underwriting/policy/bind
report_outcome(session_id, req)POST /v1/score/:id/outcome
health()GET /v1/health

Try it

Pick an activity, a spot and the flags. Runs against the live engine (public demo tenant, 60 calls / hour / IP); falls back to a deterministic sample.

Try it · liveready
request
activity
spot
expected response

Display-only — the real /v1/score request has no option to omit fields; this just trims what's shown here.

{
"score": 76,
"verdict": "favorable",
"confidence": 0.75,
"breakdown": {
"wind": {
"contribution": 0.323,
"score": 77,
"hasData": true
},
"wave": {
"contribution": 0.137,
"score": 76,
"hasData": true
},
"tide": {
"contribution": 0.085,
"score": 85,
"hasData": true
},
"thermal_breeze": {
"contribution": 0.094,
"score": 78,
"hasData": true
},
"sun": {
"contribution": 0.062,
"score": 78,
"hasData": true
},
"gust_factor": {
"contribution": 0.077,
"score": 77,
"hasData": true
}
},
"physics": {
"wind": {
"value": 28,
"unit": "knots"
},
"wave": {
"value": 2.4,
"unit": "meters"
},
"period": {
"value": 6.8,
"unit": "seconds"
},
"tide": {
"phase": "falling"
}
},
"alerts": [],
"provider_chain": [
"stormglass",
"openmeteo-marine"
],
"eco": {
"metarValidation": {
"stationId": "LE81",
"sourceDistanceKm": 3.2,
"observedAt": "2026-05-23T08:42:13.952Z",
"wind": {
"validated": true,
"observedMs": 8.8,
"forecastMs": 11.1,
"overridden": false
}
},
"cmemsWaveValidation": {
"validated": true,
"observedHeightM": 1.87,
"forecastHeightM": 0.73,
"overridden": false,
"sourceDistanceKm": 15.9
},
"sstValidation": {
"validated": true,
"observedC": 14.7,
"forecastC": 20.3,
"overridden": true,
"sourceDistanceKm": 17
}
},
"computed_at": "2026-05-23T09:00:00.000Z"
}

Errors

Non-2xx raises GoableAPIError (with status, code, issues, plus retry_after_seconds / rate_limit); transport failures raise GoableNetworkError. A refused underwriting bind raises DriftActiveError, a subclass of GoableAPIError. See Errors & rate limits.

from goable_sdk import GoableAPIError

try:
 goable.score(req)
except GoableAPIError as err:
 print(err.status, err.code)

Types

ScoreResponse and the rest are pydantic v2 models generated from the server's OpenAPI 3.1 spec, importable straight from goable_sdk — an API change flows into the models without hand-editing. Full endpoint reference: POST /v1/score.