Skip to main content

Labx Python Client

Project description

Labx

Lab Environment Task Manager

labx-py

Labx Python Client

Usage

Install

pip install labx-py

Example

import labx

# Initiate labx client and test connection
labx.connect()
# Or with custom labx service url
# labx.connect("http://labx-svc")
# Default labx service url can be set via env variable LABX_URL 

# Print connected state
print(labx.connected())

# Print worker profiles
print(labx.profiles())

# Print tasks
print(labx.tasks())

# Config and Run Task
run_req = labx.RunRequest(
    task_name="my_task",
    profile_name="gpu-light",
    params_list=[
        {"img_url": "url1", "resol": 0},
        {"img_url": "url2", "resol": 0},
    ],
    extra_cfg={}
)
run_id = labx.run(run_req)

# Waiting for Run ...
import time
while "running" == labx.status(run_id).state:
    time.sleep(60)
    print(f"Task {run_id} is running ...")

# Check Run Status and Output
print("Final Status:", labx.status(run_id))
print("Output:", labx.output(run_id))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labx_py-2025.8.5.post1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

labx_py-2025.8.5.post1-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file labx_py-2025.8.5.post1.tar.gz.

File metadata

  • Download URL: labx_py-2025.8.5.post1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for labx_py-2025.8.5.post1.tar.gz
Algorithm Hash digest
SHA256 f869260757fe5a923c7bd92b2ebfc0ab44ad28a6653a84eff0bd42e544be544d
MD5 3eb54925ef1e4b9fafa53f8f40c617e2
BLAKE2b-256 bb75c876c51620e9b2f94ef708f908a19b14a1a5c19f49ad770a9d170cba7aae

See more details on using hashes here.

File details

Details for the file labx_py-2025.8.5.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for labx_py-2025.8.5.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcbd30ebe5a9a094653438d178ed15d8150385346dc4386fb67b0eb3983c1ac2
MD5 8eda46004e8b618f768dbcb971a82f56
BLAKE2b-256 fc5ff5f9bdb1825f86425c2ed5dc89159adaa491dce4a1beae4269a71df1eae5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page