A Galaxy GA4GH WES client and CLI built on BioBlend's client layer
Project description
gxy-wes-bioblend
A client and command line tool for Galaxy's GA4GH Workflow Execution Service (WES) API, built on the BioBlend client layer.
It is the BioBlend-based sibling of
gxy-wes. Both walk the same flow —
discover the service, stage an input dataset, submit a workflow, poll the run,
read outputs and per-task logs — but where gxy-wes uses a hand-rolled
requests wrapper to stay dependency-light, this project layers the WES
endpoints on top of BioBlend's GalaxyInstance.
Why BioBlend
BioBlend does not implement the WES endpoints, but it already provides everything around them, so there is no reason to re-write it:
- API-key storage and auth headers —
GalaxyInstanceholds the key and attachesx-api-key(or a bearer token) to every request. - Request and retry plumbing — the
Clientbase's_get/_posthandle JSON decoding, multipart encoding, retries, and consistentConnectionErrors. - Upload and staging —
gi.tools.paste_content/gi.tools.upload_fileandgi.historiescreate the input datasets WES expects to already exist. - Job logs —
gi.jobs.show_job(..., full_details=True)exposes stdout/stderr without a bespoke endpoint call.
WesClient adds only the WES wire protocol, as an ordinary
bioblend.galaxy.client.Client subclass — except its endpoints are rooted at
<galaxy>/ga4gh/wes/v1 instead of <galaxy>/api.
Scope
This project exists to demonstrate the WES API the BioBlend way — the shape a production application would use. For comparison:
- For the minimal, dependency-light demonstration, see gxy-wes.
- For user-facing applications, use Planemo.
Install
Run it without installing using uv:
$ uvx gxy-wes-bioblend service-info --galaxy-url http://localhost:8080
Or install it:
$ pip install gxy-wes-bioblend
Authentication
Authentication is handled by BioBlend's GalaxyInstance. Every endpoint except
service-info needs a Galaxy API key. Pass --api-key or set
GXY_WES_API_KEY; set the server with --galaxy-url or GXY_WES_URL. Get a
key with:
$ curl -s -u you@example.com:password \
http://localhost:8080/api/authenticate/baseauth
Usage
Each WES endpoint is a subcommand:
$ gxy-wes-bioblend service-info
$ gxy-wes-bioblend stage --content $'hello\nworld\n' # -> {history_id, hda_id}
$ gxy-wes-bioblend submit --workflow simple.gxwf.yml \
--params '{"input1": {"src": "hda", "id": "<hda_id>"}}' \
--engine-parameters '{"history_id": "<history_id>"}'
$ gxy-wes-bioblend status <run_id>
$ gxy-wes-bioblend get <run_id>
$ gxy-wes-bioblend tasks <run_id>
$ gxy-wes-bioblend task <run_id> 1
$ gxy-wes-bioblend list
$ gxy-wes-bioblend cancel <run_id>
$ gxy-wes-bioblend job-output <job_id> --which stderr
The demo subcommand runs the whole example end to end against a live Galaxy
(stage an input, submit the bundled Format2 workflow, poll, print outputs and
tasks):
$ export GXY_WES_API_KEY=...
$ uvx gxy-wes-bioblend demo --galaxy-url http://localhost:8080
As a library
Construct a WesClient from a BioBlend GalaxyInstance, just like any other
BioBlend client:
from bioblend.galaxy import GalaxyInstance
from gxy_wes_bioblend import WesClient
gi = GalaxyInstance("http://localhost:8080", key="...")
wes = WesClient(gi)
info = wes.service_info()
staged = wes.stage_paste("hello\nworld\n") # uses gi.histories + gi.tools
run = wes.submit_run(
workflow_type="gx_workflow_format2",
workflow_path="simple.gxwf.yml",
params={"input1": {"src": "hda", "id": staged["hda_id"]}},
engine_parameters={"history_id": staged["history_id"]},
)
status = wes.get_run_status(run["run_id"])
A connect() convenience constructor builds the GalaxyInstance for you:
from gxy_wes_bioblend import connect
wes = connect("http://localhost:8080", api_key="...")
Notes
workflow_typeis one of Galaxy's formats:gx_workflow_format2(Format2 YAML) orgx_workflow_ga(native.gaJSON). It is detected from the workflow content when you pass--workflow.- WES has no data-staging endpoint; dataset inputs must already exist in Galaxy
and are referenced as
{"src": "hda", "id": ...}. Thestagesubcommand uses BioBlend's tools client to create those. - WES errors surface as BioBlend's
ConnectionError(re-exported here asWesError), which carriesstatus_codeand abodyattribute. - Run success is determined by the WES run
state(COMPLETE), not by per-task exit codes — a failed job can be a normal part of a valid workflow.
License
MIT. See LICENSE.
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
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
File details
Details for the file gxy_wes_bioblend-0.1.0.tar.gz.
File metadata
- Download URL: gxy_wes_bioblend-0.1.0.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5e93699f601edad7938253e20de2669df2d02cc2c327339572b4836db808d4
|
|
| MD5 |
650efa6a7b2e381ec35ce031d6310c0b
|
|
| BLAKE2b-256 |
caf7194e621cf67e52fc041d2af7e313a2e7c2945d4459f628d5834a3857f422
|
Provenance
The following attestation bundles were made for gxy_wes_bioblend-0.1.0.tar.gz:
Publisher:
deploy.yaml on jmchilton/gxy-wes-bioblend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gxy_wes_bioblend-0.1.0.tar.gz -
Subject digest:
cb5e93699f601edad7938253e20de2669df2d02cc2c327339572b4836db808d4 - Sigstore transparency entry: 1757133604
- Sigstore integration time:
-
Permalink:
jmchilton/gxy-wes-bioblend@d66420e079c5d1433c23eb31d5c30234cc847182 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jmchilton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@d66420e079c5d1433c23eb31d5c30234cc847182 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gxy_wes_bioblend-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gxy_wes_bioblend-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cade679f870061850d2311be6ce1b9a0972c0b98fcfb8e9532fdb1a1febbbd7c
|
|
| MD5 |
1ef4f3d1b1d2e91f6f8732e6aa5539a7
|
|
| BLAKE2b-256 |
23223b9d1188ca7fe311e68a111ff70eb692f607f95b0f8586e0eb78bbe685c9
|
Provenance
The following attestation bundles were made for gxy_wes_bioblend-0.1.0-py3-none-any.whl:
Publisher:
deploy.yaml on jmchilton/gxy-wes-bioblend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gxy_wes_bioblend-0.1.0-py3-none-any.whl -
Subject digest:
cade679f870061850d2311be6ce1b9a0972c0b98fcfb8e9532fdb1a1febbbd7c - Sigstore transparency entry: 1757133679
- Sigstore integration time:
-
Permalink:
jmchilton/gxy-wes-bioblend@d66420e079c5d1433c23eb31d5c30234cc847182 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jmchilton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yaml@d66420e079c5d1433c23eb31d5c30234cc847182 -
Trigger Event:
push
-
Statement type: