Overview
About the FluidStack Software Development Kit for Python applications
FluidStack’s Python SDK assists in developing applications in Python using the FluidStack API.
It includes the following features:
- Type definitions for all request and response fields
- Synchronous and asynchronous clients powered by httpx
- Exception handling as subclasses of ApiError
- Configurable timeouts
- Automatic retries with exponential backoff
Async client
The SDK exports an async client for making non-blocking calls to our API.
Exception handling
All errors thrown by the SDK are subclasses of ApiError
.
Advanced
Timeouts
By default, requests will time out after 60 seconds. Configure the timeout duration with the timeout_in_seconds
option at the client or request level.
Retries
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long as the request is deemed retriable and the number of retry attempts has not grown larger than the configured retry limit (default: 2
).
A request is deemed retriable when any of the following HTTP status codes is returned:
- 408 (Timeout)
- 429 (Too Many Requests)
- 5XX (Internal Server Errors)
Use the max_retries
request option to configure this behavior.
Custom HTTP client
You can override the httpx client to customize it for your use-case. Some common use-cases include support for proxies and transports.
Beta status
This SDK is in Preview, and there may be breaking changes between versions without a major version update.
To ensure a reproducible environment (and minimize risk of breaking changes), we recommend pinning a specific package version.