Skip to main content
The official VZaps Python SDK wraps authentication, HTTP calls, required headers, realtime events, and the main public API resources. Use it in Python backends, CLIs, jobs, notebooks, and server-to-server automations.

Requirements

ResourceVersion
Python3.10 or higher

Install

pip install vzaps

Create the client

from vzaps import VZapsClient

client = VZapsClient(
    client_token="your-client-token",
    client_secret="your-client-secret",
)
Async applications can use AsyncVZapsClient:
from vzaps import AsyncVZapsClient

async with AsyncVZapsClient(
    client_token="your-client-token",
    client_secret="your-client-secret",
) as client:
    instances = await client.instances.list()

Credentials

CredentialWhere to useDescription
client_tokenClient constructorAccount client token, also sent as X-Client-Token.
client_secretClient constructorSecret used by the SDK to obtain and refresh JWTs.
instance_tokenEach instance callInstance token, sent as X-Instance-Token.
Do not expose client_secret or instance_token in public front ends.

Automatic authentication

The SDK obtains a JWT with client_token and client_secret, caches it in memory, and refreshes it before expiry.
access_token = client.auth.get_access_token()

Client options

OptionDefaultUse
timeout30.0HTTP timeout in seconds or httpx.Timeout.
limitsNoneOptional httpx.Limits.
token_skew_seconds60.0Refresh JWT before actual expiry.
user_agentSDK defaultHTTP User-Agent header.

Environment variables

VZAPS_CLIENT_TOKEN=your-client-token
VZAPS_CLIENT_SECRET=your-client-secret
VZAPS_INSTANCE_ID=VZ...
VZAPS_INSTANCE_TOKEN=your-instance-token

Next steps