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.9.2.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.9.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file labx_py-2025.9.2.tar.gz.

File metadata

  • Download URL: labx_py-2025.9.2.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.9.2.tar.gz
Algorithm Hash digest
SHA256 9316a2d9cb8e342ed74596c29fb6d4400ee91732083c2c17dcf84fc6be86d50e
MD5 8c647a701691571ba7f903e17020e77a
BLAKE2b-256 8fce2345fc82ef10aa110bddec53190a976d0904983faef5e52fbc76d94cc27f

See more details on using hashes here.

File details

Details for the file labx_py-2025.9.2-py3-none-any.whl.

File metadata

  • Download URL: labx_py-2025.9.2-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for labx_py-2025.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5694f3ce9bd2a77aa178126c82f11c44800b85644c99a9e4afb0c0be3fbf20d9
MD5 e73502e74b1e645ef88e0eb00da61ff9
BLAKE2b-256 f35daf58d0b30727ac0945437878c769ac8c58f70785015d4bb098f8a27fdc38

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