Configuration
Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
QUALIA_API_KEY | Your API key (used if not passed to constructor) |
QUALIA_BASE_URL | Override the API base URL (default: https://api.qualiastudios.dev) |
QUALIA_QUIET | Set to 1 to silence the live per-phase upload progress written to stderr |
QUALIA_UPLOAD_SERVER_BUDGET_SECONDS | How long the server may go without reporting an upload step before the client gives up (default 3600) |
QUALIA_SERVER_STALE_SECONDS | How long the server’s live preparation heartbeat may go stale before the client gives up (default 240) |
from qualia import Qualia
# Uses QUALIA_API_KEY environment variableclient = Qualia()
# Or pass explicitlyclient = Qualia(api_key="your-api-key")Waiting on a long upload
Section titled “Waiting on a long upload”An upload’s server-side phases — staged-data verification and ingest — are bounded by silence, not elapsed time. Ingest has no upper bound: it parses every bag and transcodes every camera, so a large upload is free to take as long as it takes.
QUALIA_UPLOAD_SERVER_BUDGET_SECONDS is how long the server may go without
reporting a step on your upload; each step it does report restarts that clock.
Two signals end the wait earlier: the server publishing a failure for the
upload, and its live preparation heartbeat going stale for
QUALIA_SERVER_STALE_SECONDS (which must stay under the 300 s lease TTL).
Raise them for a slow link or a very large session; lower them to fail faster in
CI. To watch progress instead of waiting blind, pass on_progress to
client.data.upload().
Custom HTTP Client
Section titled “Custom HTTP Client”Use a custom httpx client for advanced configuration like timeouts and connection limits.
import httpxfrom qualia import Qualia
custom_client = httpx.Client( timeout=60.0, limits=httpx.Limits(max_connections=10),)
client = Qualia(api_key="...", httpx_client=custom_client)Context Manager
Section titled “Context Manager”Automatically close the client when done using a context manager.
from qualia import Qualia
with Qualia(api_key="...") as client: models = client.models.types()# Client is automatically closed