Registry / http-networking / bioblend

bioblend

JSON →
library1.9.0pypypi✓ verified 85d ago

BioBlend is a Python library for interacting with the Galaxy API. It simplifies scripting and automating Galaxy analyses, as well as administering a Galaxy server. The library supports Python 3.10 - 3.14 and Galaxy release 19.05 and later. It is actively developed and maintained, with regular releases.

pip install bioblend
INSTALL
IMPORT
SIG · BIOBLEND
B
bioblend
http-networkingpythonv1.9.0
Install
4.9s avg
Import
1347ms
Disk
35MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 1.408s · 34.5MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.9s · import 1.285s · 37MB
35MB installed
● package 35MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GalaxyInstance (standard API)
from bioblend.galaxy import GalaxyInstance
Used for the original, function-based API interactions.
GalaxyInstance (object-oriented API)
from bioblend.galaxy.objects import GalaxyInstance
Provides a more object-oriented way to interact with Galaxy entities, though it may have a more restricted set of modules compared to the standard API.

This quickstart demonstrates how to connect to a Galaxy instance using `bioblend` and perform basic operations like listing histories and retrieving the Galaxy version. Ensure your Galaxy server is running and your API key is configured either directly in the script or via environment variables.

import os from bioblend.galaxy import GalaxyInstance # Replace with your Galaxy URL and API key or set as environment variables GALAXY_URL = os.environ.get('GALAXY_URL', 'http://localhost:8080') GALAXY_API_KEY = os.environ.get('GALAXY_API_KEY', 'YOUR_API_KEY_HERE') if GALAXY_API_KEY == 'YOUR_API_KEY_HERE': print("Warning: Please replace 'YOUR_API_KEY_HERE' with your actual Galaxy API key or set the GALAXY_API_KEY environment variable.") exit(1) try: # Connect to the Galaxy instance gi = GalaxyInstance(GALAXY_URL, key=GALAXY_API_KEY) # Example: Get a list of available histories histories = gi.histories.get_histories() print(f"Found {len(histories)} histories:") for hist in histories[:3]: # Print first 3 histories print(f" - Name: {hist['name']}, ID: {hist['id']}") # Example: Get current Galaxy version version = gi.config.get_version() print(f"Galaxy Version: {version}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure your Galaxy server is running and accessible, and your API key is correct.")
Debug
Known issues
breakingAPI key authentication mechanism changed in BioBlend v0.16.0. The API key must now be passed via the `x-api-key` header instead of as a direct parameter in some requests.
fix
Ensure your `GalaxyInstance` initialization and subsequent API calls correctly pass the API key using the `key` parameter during `GalaxyInstance` creation, which handles the header internally. Old scripts might need updating.
affects: >=0.16.0
deprecatedSeveral methods were deprecated and removed in BioBlend v0.15.0, including `HistoryClient.download_dataset()`, `HistoryClient.get_current_history()`, `WorkflowClient.export_workflow_json()`, and `WorkflowClient.import_workflow_json()`.
fix
Refer to the BioBlend documentation for the current equivalents. For example, `export_workflow_dict()` and `import_workflow_dict()` replace the JSON-specific workflow methods.
affects: >=0.15.0
gotchaThere are two `GalaxyInstance` classes available: `bioblend.galaxy.GalaxyInstance` and `bioblend.galaxy.objects.GalaxyInstance`. They expose different API styles (procedural vs. object-oriented) and may have different coverage of Galaxy modules.
fix
Choose the appropriate `GalaxyInstance` based on your desired interaction style. The standard API (`bioblend.galaxy`) generally offers broader coverage, while the `objects` API provides a more Pythonic interface for common tasks. Be aware that methods available on one might not be on the other.
affects: All
Errors
Common errors & fixes
bioblend.galaxy.client.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
The Galaxy server URL is incorrect, the server is not running, or there are network issues preventing connection.
fix
Verify the `GALAXY_URL` is correct and accessible. Ensure the Galaxy server is running and configured to accept API connections. Check firewall rules if connecting remotely.
bioblend.galaxy.client.GalaxyAPIError: Client error: 403 Forbidden - Please provide a valid API key.
The provided API key is invalid, has insufficient permissions, or the Galaxy server requires authentication that was not met.
fix
Double-check your `GALAXY_API_KEY` for typos. Ensure the key belongs to a user with the necessary permissions on the Galaxy server. Generate a new API key if unsure.
AttributeError: 'HistoryClient' object has no attribute 'get_current_history'
You are trying to use a method that has been deprecated and removed from the BioBlend library in newer versions.
fix
Consult the BioBlend documentation (e.g., `bioblend.readthedocs.io`) for the version you are using to find the updated method for retrieving the current history, or refactor your code to use `get_histories()` and select the desired one.
Upgrade
Version history
1.9.0latest on PyPI · released Apr 14, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
bioblend — pip install bioblend · libregistry