Name | labx-py JSON |
Version |
2025.8.4
JSON |
| download |
home_page | None |
Summary | Labx Python Client |
upload_time | 2025-08-19 07:13:05 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | BSD |
keywords |
labx
labserver
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Labx
Lab Environment Task Manager
## labx-py
Labx Python Client
### Usage
#### Install
```sh
pip install labx-py
```
#### Example
```py
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
cluster_cfg = {
"worker_profile": "gpu-light",
"worker_scale": 2
}
params = [
{"img_url": "url1", "resol": 0},
{"img_url": "url2", "resol": 0},
]
run_id = labx.run("my_task", cluster_cfg, params)
import time
while "running" == labx.status(run_id):
time.sleep(60)
print(f"Task {run_id} is running ...")
status = labx.status(run_id)
if "failed" == status:
print(labx.output(run_id).error)
elif "completed" == status:
results = labx.output(run_id).results
```
Raw data
{
"_id": null,
"home_page": null,
"name": "labx-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "labx, labserver",
"author": null,
"author_email": "\"Zi-Jian Yi (\u4f0a\u5b50\u5065)\" <arrowzeke@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6c/ab/5af134a087d9c700a22b249e29e56a1496ef5d156456554bacf16e4b68db/labx_py-2025.8.4.tar.gz",
"platform": null,
"description": "# Labx\nLab Environment Task Manager\n## labx-py\nLabx Python Client\n### Usage\n#### Install\n```sh\npip install labx-py\n```\n#### Example\n```py\nimport labx\n\n# Initiate labx client and test connection\nlabx.connect()\n# Or with custom labx service url\n# labx.connect(\"http://labx-svc\")\n# Default labx service url can be set via env variable LABX_URL \n\n# Print connected state\nprint(labx.connected())\n\n# Print worker profiles\nprint(labx.profiles())\n\n# Print tasks\nprint(labx.tasks())\n\n# Config and Run Task\ncluster_cfg = {\n \"worker_profile\": \"gpu-light\",\n \"worker_scale\": 2\n}\nparams = [\n {\"img_url\": \"url1\", \"resol\": 0},\n {\"img_url\": \"url2\", \"resol\": 0},\n]\nrun_id = labx.run(\"my_task\", cluster_cfg, params)\n\nimport time\nwhile \"running\" == labx.status(run_id):\n time.sleep(60)\n print(f\"Task {run_id} is running ...\")\nstatus = labx.status(run_id)\nif \"failed\" == status:\n print(labx.output(run_id).error)\nelif \"completed\" == status:\n results = labx.output(run_id).results\n```\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Labx Python Client",
"version": "2025.8.4",
"project_urls": {
"Repository": "https://github.com/i-z-j/labx-py"
},
"split_keywords": [
"labx",
" labserver"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c342ed549895a37d3c0aa1552271c6d39c74fb97cc66d4e181aebdc0bfd055e2",
"md5": "4cb507fcaf4c73d84d6cba8afdf10e15",
"sha256": "17ee496702c1f9c409b593b3aeae1199c91f6d80f9c0b2dd925f1fec11a59ceb"
},
"downloads": -1,
"filename": "labx_py-2025.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4cb507fcaf4c73d84d6cba8afdf10e15",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 5386,
"upload_time": "2025-08-19T07:13:04",
"upload_time_iso_8601": "2025-08-19T07:13:04.737162Z",
"url": "https://files.pythonhosted.org/packages/c3/42/ed549895a37d3c0aa1552271c6d39c74fb97cc66d4e181aebdc0bfd055e2/labx_py-2025.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6cab5af134a087d9c700a22b249e29e56a1496ef5d156456554bacf16e4b68db",
"md5": "44aa788e10461390a382c6792e9ad967",
"sha256": "61460b463b82406fb93054a39496fe0654eefc41a2421ccc52ece9ee43137588"
},
"downloads": -1,
"filename": "labx_py-2025.8.4.tar.gz",
"has_sig": false,
"md5_digest": "44aa788e10461390a382c6792e9ad967",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 4706,
"upload_time": "2025-08-19T07:13:05",
"upload_time_iso_8601": "2025-08-19T07:13:05.929793Z",
"url": "https://files.pythonhosted.org/packages/6c/ab/5af134a087d9c700a22b249e29e56a1496ef5d156456554bacf16e4b68db/labx_py-2025.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-19 07:13:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "i-z-j",
"github_project": "labx-py",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "labx-py"
}