A command-line tool for querying statistics from the WorkflowHub API.
Built by Anna Syme with Claude (Anthropic).
WorkflowHub is a registry for scientific workflows. This tool lets you query it from the command line to answer questions like:
- Which workflows in a project have the most views and downloads?
- Which workflows are most popular across the entire site?
- What workflow types (Galaxy, Nextflow, Snakemake, etc.) are most common?
- Which spaces/projects have the most workflows?
- Who are the top contributors by number of workflows?
Results are printed to the terminal and saved as a CSV file.
Python 3.
Download workflowhub.py to your computer.
Open a terminal, navigate to the folder where you saved the script, and run one of the following commands.
Fetches workflow metadata and view/download counts for a WorkflowHub project.
python3 workflowhub.py galaxyDefaults to the Galaxy Australia project (ID 54). To query a different project:
python3 workflowhub.py galaxy --project-id 12| Option | Description | Default |
|---|---|---|
--project-id ID |
WorkflowHub project ID | 54 (Galaxy Australia) |
--output FILE |
CSV file to save results to | workflowhub_galaxy.csv |
Fetches view and download counts for workflows across the entire site and ranks them.
python3 workflowhub.py topworkflowsNote: This command needs to fetch each workflow's HTML page to get view/download counts, which takes time. By default it checks all workflows. Use
--max-workflows 200to limit to the first 200 (faster).
| Option | Description | Default |
|---|---|---|
--top N |
How many workflows to display | 50 |
--sort-by views|downloads |
Stat to rank by | views |
--max-workflows N |
Maximum workflows to check (0 = all) |
0 (all) |
--output FILE |
CSV file to save results to | workflowhub_topworkflows.csv |
Example — top 20 by downloads:
python3 workflowhub.py topworkflows --top 20 --sort-by downloadsShows how many workflows exist for each type (Galaxy, Nextflow, Snakemake, CWL, etc.).
python3 workflowhub.py types| Option | Description | Default |
|---|---|---|
--output FILE |
CSV file to save results to | workflowhub_types.csv |
Ranks all WorkflowHub spaces/projects by number of workflows.
python3 workflowhub.py orgs| Option | Description | Default |
|---|---|---|
--top N |
How many spaces to display | 50 |
--output FILE |
CSV file to save results to | workflowhub_orgs.csv |
Ranks all WorkflowHub contributors by number of workflows.
python3 workflowhub.py leaderboard| Option | Description | Default |
|---|---|---|
--top N |
How many top contributors to display | 50 |
--highlight NAME |
Highlight a contributor whose name contains this text (case-insensitive) | none |
--output FILE |
CSV file to save results to | workflowhub_leaderboard.csv |
Example — show top 100 and highlight a specific person:
python3 workflowhub.py leaderboard --top 100 --highlight "Smith"Runs all of the above subcommands in sequence using their default settings. Output is saved to separate CSV files for each.
python3 workflowhub.py allNote: This will take a while as it queries the entire site.
Built-in help is available for all commands:
python3 workflowhub.py --help
python3 workflowhub.py galaxy --help
python3 workflowhub.py topworkflows --help
python3 workflowhub.py types --help
python3 workflowhub.py orgs --help
python3 workflowhub.py leaderboard --help
python3 workflowhub.py all --helpMIT — see LICENSE.