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.0.1.tar.gz
(39.7 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.0.1-py3-none-any.whl
(38.9 kB
view details)
File details
Details for the file omicslab-1.0.1.tar.gz.
File metadata
- Download URL: omicslab-1.0.1.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71957209c626feb7904cfce0e45b5cfa00bd07203b537471fd40b6673bd51cc5
|
|
| MD5 |
8820e15990e430d49df29f777afb9de0
|
|
| BLAKE2b-256 |
f047de3b3c581203693df489b7203bdd85c33d50d215b64848fc5f429e3b2eea
|
File details
Details for the file omicslab-1.0.1-py3-none-any.whl.
File metadata
- Download URL: omicslab-1.0.1-py3-none-any.whl
- Upload date:
- Size: 38.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 |
218adca3a923161b9aba7cb12536de913a4280e399fedeec9d7ebb8cda37e4a9
|
|
| MD5 |
2dca9e701a8bcfce249e0e9969da5e4a
|
|
| BLAKE2b-256 |
d220841d89c5c9614351b60ab9618eae8eb0db95a361ee66621852f85640f6e4
|