Python SDK and CLI for the RIVER (OmicsLab) Platform
Project description
OmicsLab SDK
Python SDK and CLI for the RIVER (OmicsLab) Platform.
- CLI:
omicslab(aliasomx) — interact with the platform from your terminal - Python SDK:
omicslab.Client— integrate programmatically
Installation
pip install omicslab
Or from source:
git clone https://github.com/gianglabs/omicslab-platform
cd omicslab-platform/sdk
pip install -e .
Quick Start
1. Authenticate
Create an API token in the web UI (Settings → API Tokens), then:
omicslab auth login --token omx_abc123...
2. Set your context
# Interactive mode — picks org, workspace, and folder
omicslab use
# Or set explicitly
omicslab use --org-id <org_id> --workspace-id <ws_id> --prefix data/
3. Navigate storage like a filesystem
omicslab ls # list files
omicslab cd results/ # change folder
omicslab pwd # show current folder
omicslab upload ./data.csv # upload a file
omicslab download results/output.txt # download a file
omicslab rm old_file.txt # delete a file
omicslab mv source.txt dest.txt # move/rename
4. Launch a job
omicslab jobs launch --workspace <ws_id> --analysis <id> --compute <id> --params '{"threads": 8}'
omicslab jobs list --workspace <ws_id>
omicslab jobs logs <job_id> --workspace <ws_id>
CLI Reference
| Command group | Description | Examples |
|---|---|---|
auth |
Login/logout | omicslab auth login --token ... |
token |
API token management | create, list, revoke |
orgs |
Organization CRUD | list, create, get, update, delete, members |
ws |
Workspace management | list, create, get, update, delete, members |
jobs |
Launch & manage jobs | launch, list, get, logs, terminate |
analysis |
Analysis tool catalog | list, create, get, update, delete, pin, schema, tags |
studio |
Studio tool catalog | list, create, get, update, delete, pin, schema, tags |
use |
Set active context | Interactive or --org-id, --workspace-id, --prefix |
| — | File commands | ls, cd, pwd, rm, mv, upload, download, env, whoami |
Python SDK
from omicslab import Client
client = Client() # reads OMICSLAB_TOKEN env or config
# List workspaces
workspaces = client.workspaces.list()
# Launch a job
job = client.jobs.launch_analysis(
workspace_id="...",
analysis_id="...",
compute_id="...",
params={"threads": 8},
)
# Storage operations
files = client.storage.list("workspace_id", prefix="data/")
url = client.storage.get_upload_url("workspace_id", "data/input.fastq")
Environment Variables
| Variable | Purpose |
|---|---|
OMICSLAB_TOKEN |
API token (overrides config file) |
OMICSLAB_BASE_URL |
API base URL (default: https://platform.omicslab.io/api) |
Configuration is stored at ~/.omicslab/config.json and supports multiple named profiles.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
omicslab-1.1.0.tar.gz
(40.6 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
omicslab-1.1.0-py3-none-any.whl
(39.9 kB
view details)
File details
Details for the file omicslab-1.1.0.tar.gz.
File metadata
- Download URL: omicslab-1.1.0.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61eeb01ef685fca8ebb3c02e9c17da7a27f1ed58ddcac494ec41ab2c77380e06
|
|
| MD5 |
476f27a7b35993cd13ad3e94dcaae7e1
|
|
| BLAKE2b-256 |
40ef8f15cdb0b36a0b5cc0dac5c5d8cbd8c1dd1ac640d095b0374052079486c6
|
File details
Details for the file omicslab-1.1.0-py3-none-any.whl.
File metadata
- Download URL: omicslab-1.1.0-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99215e6780eefb0e327b5a612398769f85e8f68d4e0a02609f9bdb1da69aa178
|
|
| MD5 |
f30ebcc69e1afada775a95bf4baea976
|
|
| BLAKE2b-256 |
c98ef4054568eebcadbb4033f96d198724b3c25aaaa1c91a1675298557263e14
|