chassis-cloud (Python)
Official Python client for the Chassis public API (/api/v1).
Default base URL: https://chassis.okeymeta.com.ng/api/v1
PyPI: chassis-cloud · import as chassis
Install
pip install chassis-cloud
Requires Python 3.10+ and httpx.
from chassis import Chassis
Auth
Create an API key in the Chassis console under API Keys. Keys look like chs_… and are shown once.
from chassis import Chassis
with Chassis(api_key="chs_...") as client:
...
Quickstart
from chassis import Chassis
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
for gpu in gpus:
print(gpu["displayName"], gpu["pricePerHourUsd"], gpu.get("stockStatus"))
instance = client.spin_up(
gpuSkuId=gpus[0]["id"],
name="gpu-host-01",
imageName="ghcr.io/YOUR_ORG/your-gpu-app:latest",
ports="8080/http,22/tcp",
)
Example: list available GPUs
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
for gpu in gpus:
print(
gpu["id"],
gpu.get("displayName"),
gpu.get("memoryGb"),
f"${gpu.get('pricePerHourUsd')}/hr",
gpu.get("stockStatus"),
)
gpu = next(
(g for g in gpus if "4090" in str(g.get("displayName", ""))),
gpus[0],
)
# use gpu["id"] as gpuSkuId on spin_up / create_cluster / create_endpoint
Example: host a GPU service
Any CUDA app — APIs, media tools, notebooks, batch workers — not only training.
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
instance = client.spin_up(
gpuSkuId=gpus[0]["id"],
name="gpu-host-01",
imageName="ghcr.io/YOUR_ORG/your-gpu-app:latest",
containerDiskGb=50,
ports="8080/http,22/tcp",
env={"MODEL_ID": "your-model"},
)
detail = client.get_instance(instance["id"])
print(detail.get("publicIp"), detail.get("connection"), detail.get("status"))
# Point your clients at publicIp / published ports
client.stop(instance["id"])
Example: training job
Spin up a dedicated GPU, run your trainer on the instance, then stop billing.
from chassis import Chassis
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
gpu = next(
(g for g in gpus if "A100" in str(g.get("displayName", ""))),
gpus[0],
)
instance = client.spin_up(
gpuSkuId=gpu["id"],
name="finetune-bert",
gpuCount=1,
imageName="pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel",
containerDiskGb=80,
ports="8888/http,22/tcp",
)
print("running", instance["id"], instance["status"])
# SSH / Jupyter → run train.py on the instance
client.stop(instance["id"])
Example: multi-node cluster
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
cluster = client.create_cluster(
name="dist-train",
gpuSkuId=gpus[0]["id"],
nodeCount=4,
gpusPerNode=1,
imageName="pytorch/pytorch:2.1.0-cuda11.8-cudnn8-devel",
)
print(client.get_cluster(cluster["id"]))
# Nodes receive CHASSIS_CLUSTER_ID, CHASSIS_NODE_RANK, CHASSIS_NODE_COUNT
client.stop_cluster(cluster["id"])
# client.terminate_cluster(cluster["id"])
Example: serverless endpoint
with Chassis(api_key="chs_...") as client:
gpus = client.list_gpus()
endpoint = client.create_endpoint(
name="text-infer",
gpuSkuId=gpus[0]["id"],
workersMin=0,
workersMax=3,
)
result = client.run_sync(
endpoint["id"],
body={
"input": {
"prompt": "Summarize Chassis in one sentence.",
"max_tokens": 128,
}
},
)
print(result)
job = client.run(endpoint["id"], body={"input": {"prompt": "hello"}})
status = client.get_job(endpoint["id"], job["id"])
print(status)
Instance options (create_instance / spin_up)
| Field | Required | Notes |
|---|---|---|
gpuSkuId |
yes | Chassis SKU UUID from list_gpus() |
name |
yes | Instance name |
gpuCount |
no | Default 1, max 8 |
imageName |
no | Container image |
containerDiskGb |
no | Default 50 |
volumeGb |
no | Ephemeral volume GB |
networkVolumeId |
no | Chassis network volume UUID |
registryCredentialId |
no | Chassis registry credential UUID |
cloudType |
no | "SECURE" or "COMMUNITY" |
ports |
no | e.g. "8080/http,22/tcp" |
env |
no | String map passed into the container |
startAfterCreate |
no | Default True (spin_up forces True) |
Methods
GPUs & instances
| Method | HTTP |
|---|---|
list_gpus() |
GET /gpus |
list_instances() |
GET /instances |
create_instance(**kwargs) |
POST /instances |
spin_up(**kwargs) |
POST /instances (startAfterCreate: true) |
get_instance(id) |
GET /instances/:id |
get_instance_logs(id, tail=None) |
GET /instances/:id/logs |
start(id) |
POST /instances/:id/start |
stop(id) |
POST /instances/:id/stop |
restart(id) |
POST /instances/:id/restart |
terminate(id) |
DELETE /instances/:id |
Clusters (multi-node)
| Method | HTTP |
|---|---|
list_clusters() |
GET /clusters |
create_cluster(**kwargs) |
POST /clusters |
get_cluster(id) |
GET /clusters/:id |
start_cluster(id) |
POST /clusters/:id/start |
stop_cluster(id) |
POST /clusters/:id/stop |
terminate_cluster(id) |
DELETE /clusters/:id |
Create with name, gpuSkuId, nodeCount (2–8), and optional gpusPerNode, imageName, networkVolumeId, ports. Nodes get CHASSIS_CLUSTER_ID, CHASSIS_NODE_RANK, and CHASSIS_NODE_COUNT.
Templates, volumes, registries
| Method | HTTP |
|---|---|
list_templates() / create_template(**kwargs) |
/templates |
list_volumes() / create_volume(**kwargs) |
/volumes |
list_registries() / create_registry(**kwargs) |
/registries |
Serverless endpoints
| Method | HTTP |
|---|---|
list_endpoints() |
GET /endpoints |
create_endpoint(**kwargs) |
POST /endpoints |
delete_endpoint(id) |
DELETE /endpoints/:id |
run(endpoint_id, body=None) |
POST /endpoints/:id/run |
run_sync(endpoint_id, body=None, wait_ms=None) |
POST /endpoints/:id/runsync |
Create options also accept env, interruptible, and publicIp.
Responses use data / error. Failures raise ChassisError with .status, .body, and a clear message.
Docs
Human setup guide: https://chassis.okeymeta.com.ng/docs
License
MIT · OkeyMeta Ltd
Metadata
Release files for chassis-cloud 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chassis_cloud-0.1.5.tar.gz | 5.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chassis_cloud-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 kB
Release files / chassis_cloud-0.1.5.tar.gz
| Download URL | chassis_cloud-0.1.5.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ddf1087a2665aff5ff020f37bc5de4239b2f8bc0b65e0e0e363d41c717b2318
|
|
BLAKE2b-256 checksum How to use checksums |
734cbee12f0eca534640d86c6ee97746396c0f1126e0115e001bfe94e14297c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / chassis_cloud-0.1.5-py3-none-any.whl
| Download URL | chassis_cloud-0.1.5-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8a993b0996d0a78262dfa1f96268fdbed33bc4a7378cd47333c5bf7fd05b531
|
|
BLAKE2b-256 checksum How to use checksums |
d8d23c8aad10a368dc5360612e6d37f430763f42d7f930a5c0bde54335570414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for chassis-cloud 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.