bricqs-sdk
Official Python SDK for BRICQS — deploy AI models, manage GPU deployments, and build AI infrastructure programmatically.
Installation
pip install bricqs-sdk
Quick start
from bricqs_sdk import BricqsClient
client = BricqsClient(api_key="<your-api-key>")
# Deploy a model (blocks until running)
dep = client.deployments.deploy(
name="my-llama-api",
model_id="meta-llama/Llama-3-8B-Instruct",
environment="production",
)
print(dep.endpoint) # https://<app>.azurecontainerapps.io
Deployments
# List all deployments
deps = client.deployments.list()
deps = client.deployments.list(environment="preview")
# Get a single deployment
dep = client.deployments.get("deployment-id")
# Deploy without waiting (non-blocking)
dep = client.deployments.deploy(
name="my-api",
model_id="mistralai/Mistral-7B-Instruct-v0.3",
wait=False,
)
# Poll manually (useful for progress bars)
for snapshot in client.deployments.poll(dep.id):
print(f"Stage: {snapshot.stage}")
# Stop, delete, promote
client.deployments.stop("deployment-id")
client.deployments.delete("deployment-id")
prod = client.deployments.promote("preview-deployment-id")
# Logs and metrics
lines = client.deployments.logs("deployment-id", lines=200)
metrics = client.deployments.metrics("deployment-id", hours=6)
print(metrics.cpu_pct) # list of {time, avg, total, max}
print(metrics.response_time_ms)
# Summary stats
summary = client.deployments.summary()
print(summary.active_deployments, summary.gpu_hours_30d)
Models
models = client.models.list()
for m in models:
print(m.id, m.task, m.gpu)
Support
ticket = client.support.create_ticket(
subject="Deployment stuck in provisioning",
body="My deployment bricqs-abc123 has been in 'creating_container' for 20 minutes.",
category="deployments",
priority="high",
)
print(ticket.id)
tickets = client.support.list_tickets()
Context manager
with BricqsClient(api_key="<token>") as client:
dep = client.deployments.deploy(name="my-api", model_id="meta-llama/Llama-3-8B-Instruct")
Error handling
from bricqs_sdk import BricqsClient, AuthError, NotFoundError, RateLimitError, BricqsError
try:
dep = client.deployments.get("nonexistent-id")
except NotFoundError:
print("Deployment not found")
except AuthError:
print("Invalid API key")
except RateLimitError:
print("Rate limited — back off and retry")
except BricqsError as e:
print(f"API error {e.status_code}: {e}")
Types
All methods return typed dataclasses:
| Type | Fields |
|---|---|
Deployment |
id, name, status, model_id, environment, endpoint, min_replicas, max_replicas, region, stage, created_at |
Model |
id, label, task, gpu, cpu, memory, description |
DeploymentSummary |
active_deployments, gpu_hours_30d, active_regions, failure_rate, requests_per_sec |
Metrics |
cpu_pct, memory_pct, requests, response_time_ms, replicas, gpu_pct |
Ticket |
id, subject, category, status, priority, created_at |
Every type also exposes a .raw dict with the full API response.
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bricqs_sdk-0.1.0.tar.gz
(6.3 kB
view details)
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 bricqs_sdk-0.1.0.tar.gz.
File metadata
- Download URL: bricqs_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99b02a68d5d36c8933f45cfa3a52cd2832630c53a44629a98fd534f14ab0620a
|
|
| MD5 |
a1c539f6036e529a7a6925720121a132
|
|
| BLAKE2b-256 |
3f418f06e836af9bd8b0efee80d5cef22d26763a44293f07c4b446cc1d78c0d9
|
File details
Details for the file bricqs_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bricqs_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
968b5d9ff29ccfaf5bc020dcc9fc3812404d5d9168b72fac2507543e4548ea56
|
|
| MD5 |
0b263d6bf02091d2a9b7630b98ff1183
|
|
| BLAKE2b-256 |
7cadcf486a00efdf1fc910c00068d503422a42bdbbba2b0c3af2650046d0f863
|