Velocity Cloud Sandbox
This library provides convenient access to the Velocity Cloud Sandbox REST API from Python.
The full API of this library can be found in api.md.
Contents
- Installation
- Usage
- API Reference
- Async
- Authentication
- Errors
- Client Options
- Retries and Timeouts
- Helpers
- Logging
- Requirements
Installation
pip install velocity-cloud-sandbox
Usage
import os
from velocity_cloud_sandbox import VelocityCloudSandbox
client = VelocityCloudSandbox(
clerk_api_key=os.environ.get("VELOCITY_API_KEY"),
)
workspace = client.workspaces.list()
print(workspace)
The examples in the following sections assume a client configured as shown above.
See the API reference for every available operation.
Async
Every client has an Async counterpart (AsyncVelocityCloudSandbox) exposing the same resource tree with await.
import asyncio
from velocity_cloud_sandbox import AsyncVelocityCloudSandbox
async def main() -> None:
client = AsyncVelocityCloudSandbox()
workspace = await client.workspaces.list()
asyncio.run(main())
Authentication
Pass credentials to the generated client constructor. Environment variables are read automatically when supported by the target runtime.
| Option | Type | Default | Description |
|---|---|---|---|
clerk_api_key |
string | provider |
- | Authenticate using your Clerk API Key header: Authorization: Bearer ak_... Defaults to VELOCITY_API_KEY. |
Declared schemes:
ClerkApiKeybearer token
Errors
Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
from velocity_cloud_sandbox import APIStatusError
try:
workspace = client.workspaces.list()
except APIStatusError as err:
print(err.status_code, err.message)
raise
Documented error statuses: 400, 401, 403, 404, 429.
Client Options
Configure the generated client by setting any of these options when you create it.
from velocity_cloud_sandbox import VelocityCloudSandbox
client = VelocityCloudSandbox(
timeout=60.0,
max_retries=2,
)
| Option | Type | Default | Description |
|---|---|---|---|
clerk_api_key |
str | None |
os.environ.get("VELOCITY_API_KEY") |
Authenticate using your Clerk API Key header: Authorization: Bearer ak_... |
base_url |
str | httpx.URL | None |
- | Override the default API base URL. |
timeout |
float | Timeout | None |
60.0 |
Maximum time in seconds to wait for a response before aborting a request. |
max_retries |
int |
2 |
Number of retries for temporary failures. |
default_headers |
Mapping[str, str] | None |
- | Headers sent with every request. |
default_query |
Mapping[str, object] | None |
- | Query parameters sent with every request. |
Retries and Timeouts
Generated clients support request timeouts and retry temporary failures such as network errors, 408, 409, 429, and 5xx responses. Retry delays honor Retry-After headers when present. Tune the retry and timeout client options shown above, or override them per request.
Helpers
- Use
client.with_raw_response.<resource>.<method>(...)to access the rawhttpx.Responseand parse it yourself. - Use
client.with_streaming_response.<resource>.<method>(...)to stream a response body without buffering it.
Logging
- Set the
VELOCITY_LOGenvironment variable toinfoordebugto enable HTTP logging. - Logs are emitted through the standard
loggingmodule under thevelocity_cloud_sandboxlogger.
Requirements
- Python 3.8 or newer
Powered by Scalar.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file velocity_cloud_sandbox-0.1.0.tar.gz.
File metadata
- Download URL: velocity_cloud_sandbox-0.1.0.tar.gz
- Upload date:
- Size: 88.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b49e930f0393e222c55cae566fe1b5317fdbfd696fe4ecefb5eaee09cedc6780
|
|
| MD5 |
720e6f28a28b6d95a28308ccf04cd717
|
|
| BLAKE2b-256 |
53064388b643d5c4a38c51b1ebb77860b753541b0546650700281e62f7ebfe8f
|
File details
Details for the file velocity_cloud_sandbox-0.1.0-py3-none-any.whl.
File metadata
- Download URL: velocity_cloud_sandbox-0.1.0-py3-none-any.whl
- Upload date:
- Size: 96.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45443d3bd5f92cf0799309482680a06004fe20b36382866e3b9b207488080225
|
|
| MD5 |
2bf48a47b6242b76a74269f9882dff27
|
|
| BLAKE2b-256 |
736c9bb2ec62af40a7e0ce4dcb058b2ae90d2ebe6e6ff9857ca27b292d41ff99
|