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.2.0.tar.gz
(42.5 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.2.0-py3-none-any.whl
(41.4 kB
view details)
File details
Details for the file omicslab-1.2.0.tar.gz.
File metadata
- Download URL: omicslab-1.2.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5bb8ec950199c42c12743132d1585408a79a4708b5f4204d896b652c68d1bab
|
|
| MD5 |
ac23e4cbb40533847df9d67b5f6caacf
|
|
| BLAKE2b-256 |
eb9f4bba1e46ed5c4e8d23b75ac0ea8301461f791692f4ae1e3076f6624dd169
|
File details
Details for the file omicslab-1.2.0-py3-none-any.whl.
File metadata
- Download URL: omicslab-1.2.0-py3-none-any.whl
- Upload date:
- Size: 41.4 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 |
d36b129c4b5472c0165aae5467cbfe11b3495f431096767b1a41c38b6d1523b8
|
|
| MD5 |
da85daaaa9256ecc9bcadd11edc03df6
|
|
| BLAKE2b-256 |
adf656cd186c9d120b3e54697508e8f2954aea25a0a0bf91e703cd7aa6c70ae2
|