ThrustLab

Python SDK

The official thrustlab package on PyPI — a synchronous Python wrapper around the /v1/ HTTP API. Bearer auth, automatic idempotency keys on mutations, retries with backoff, cursor pagination, blocking waits for async resources, and webhook signature verification, all out of the box.

Install

pip install thrustlab

Requires Python 3.10+. Verify the install:

python -c "import thrustlab; print(thrustlab.__version__)"

First call

Set $THRUSTLAB_API_KEY to a key from /dashboard/api-keys, then:

from thrustlab import Client

client = Client()
me = client.users.me()
print(me["email"], me["tier"])

For the full constructor (custom base URL, timeouts, retries, custom httpx client), see configuration.

Resources

Every public /v1/ route family is available as an attribute on Client. Resources lazy-initialize on first access, so importing Client is cheap.

AccessorDescription
client.usersRead the calling user's profile
client.projectsWorkspaces for sims, sweeps, and starred components
client.simulationsSingle-point steady-state simulations (async)
client.sweepsMulti-point parameter studies (async)
client.dynamic_simulationsTime-domain missions: schedule → samples / series / scorecard (async)
client.componentsCatalog of motors / propellers / batteries / ESCs
client.submissionsSubmit a custom component for moderation
client.starred_componentsPer-project favorites
client.compute_unitsBalance and transaction history
client.webhook_endpointsRegister and manage webhook endpoints

Patterns

Cross-cutting concerns covered once instead of per-resource:

TopicDescription
ConfigurationConstructor args, env vars, custom httpx client
IdempotencyAuto-generated and explicit Idempotency-Keys
PaginationCursorPager, auto-iterate, manual cursor
Async resourceswait() polling vs webhooks
Retries & timeoutsAutomatic retry policy and tuning
Error handlingTyped exceptions, code catalog, request_id
Webhook verificationWebhook.verify for incoming deliveries
Logging & debuggingLogger names, retry traces, httpx logs
Versioning & stabilitySemVer policy, deprecation timeline

Source + issues

Source lives in the public thrustlab-sdk repository. File issues there or email [email protected] with your request_id.

We use cookies and analytics tools to understand how you use ThrustLab and improve the experience. Privacy Policy

ThrustLab API | ThrustLab