Skip to main content

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

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:

  • ClerkApiKey bearer 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 raw httpx.Response and parse it yourself.
  • Use client.with_streaming_response.<resource>.<method>(...) to stream a response body without buffering it.

Logging

  • Set the VELOCITY_LOG environment variable to info or debug to enable HTTP logging.
  • Logs are emitted through the standard logging module under the velocity_cloud_sandbox logger.

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

velocity_cloud_sandbox-0.1.0.tar.gz (88.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velocity_cloud_sandbox-0.1.0-py3-none-any.whl (96.6 kB view details)

Uploaded Python 3

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

Hashes for velocity_cloud_sandbox-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b49e930f0393e222c55cae566fe1b5317fdbfd696fe4ecefb5eaee09cedc6780
MD5 720e6f28a28b6d95a28308ccf04cd717
BLAKE2b-256 53064388b643d5c4a38c51b1ebb77860b753541b0546650700281e62f7ebfe8f

See more details on using hashes here.

File details

Details for the file velocity_cloud_sandbox-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for velocity_cloud_sandbox-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45443d3bd5f92cf0799309482680a06004fe20b36382866e3b9b207488080225
MD5 2bf48a47b6242b76a74269f9882dff27
BLAKE2b-256 736c9bb2ec62af40a7e0ce4dcb058b2ae90d2ebe6e6ff9857ca27b292d41ff99

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page