Skip to main content

SDKs

Solti maintains fully typed native SDKs for Python (solti-sdk), TypeScript (@solti/sdk), and Go (github.com/trysolti/solti-sdk-go).

  • Python — solti-sdk (import solti), rigorously typed with pydantic models and Literal string unions. Manual →
  • TypeScript — @solti/sdk, deeply typed with nested interfaces and string-union types for every finite value set. Manual →
  • Go — solti-sdk-go (package solti), context-first, functional options, errors.Is/errors.As typed errors, zero external dependencies. Manual →

All SDKs mirror the REST API resource structure:

SoltiClient
├── .jobs create / get / list / cancel / wait_until_complete
├── .workflows create / get / list / list-for-cronjob / cancel (Go SDK v0.1.0+)
├── .connections create / get / list / delete
├── .cronjobs create / get / list / patch (update) / delete
├── .keys create / list / delete (admin only)
└── .resources storages / repositories / virtual-machine-pools (Go SDK v0.1.0+)

Installation​

Python (PyPI):

pip install solti-sdk

TypeScript (npm):

npm i @solti/sdk

Go (module proxy):

go get github.com/trysolti/solti-sdk-go

Client Setup​

# Python
from solti import SoltiClient
client = SoltiClient(api_key="...", project_id="proj-...")
// TypeScript
import { SoltiClient } from "@solti/sdk";
const client = new SoltiClient({ apiKey: process.env.SOLTI_API_KEY, projectId: "proj-..." });
// Go
import "github.com/trysolti/solti-sdk-go/solti"

client, err := solti.NewClient(
solti.WithAPIKey(os.Getenv("SOLTI_API_KEY")),
solti.WithProjectID("proj-..."),
)

api_key / apiKey falls back to the SOLTI_API_KEY environment variable; the project is selected via the X-Solti-Project-Id header (project_id / projectId argument or SOLTI_PROJECT_ID environment variable) — the SDKs always target the global API host, exactly like the CLI.

Typed Value Sets​

Every finite value set is a strict union in the typed SDKs — job statuses (queued | booting | running | succeeded | failed | cancelled), VM statuses (nonassigned | provisioning | provisioned | terminating | terminated | error), cloud providers (aws | gcp | azure), connection types (aws | gcp | azure | r2 | github), and key roles (admin | developer | viewer). In Go these are documented string constants in the solti package.

All three SDKs are kept wire-identical by a shared conformance fixture suite (trysolti/sdk-conformance) that each SDK's test suite asserts against.

See the full manuals: Python SDK · TypeScript SDK · Go SDK.