Registry / data / galaxy-util

galaxy-util

JSON →
library26.0.1pypypi✓ verified 87d ago

The `galaxy-util` package provides common utility functions and helper classes used across the larger Galaxy bioinformatics platform. It is an integral part of the Galaxy ecosystem, supporting various functionalities within the main application. Currently at version 26.0.0, it follows the rapid release cadence of the main Galaxy project, often tied to its major releases. While available on PyPI, its primary use case is within the Galaxy project itself.

pip install galaxy-util
INSTALL
IMPORT
SIG · GALAXY-UTIL
G
galaxy-util
datapythonv26.0.1
Install
3.3s avg
Import
840ms
Disk
33MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.0.1 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.894s · 34.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.3s · import 0.786s · 35MB
33MB installed
● package 33MB
Code
Verified usage

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

safe_path
from galaxy.util.path import safe_path
from galaxy_util.path import safe_path
The PyPI package `galaxy-util` exposes its modules under the `galaxy.util` namespace, not `galaxy_util`.
parse_json_string
from galaxy.util.json import parse_json_string
sanitize_text
from galaxy.util.sanitize_text import sanitize_text

This quickstart demonstrates basic usage of two common utility functions: `safe_path` for sanitizing path components and `sanitize_text` for removing potentially dangerous HTML/script tags from strings. These are representative of the type of general-purpose helpers found in `galaxy-util`.

from galaxy.util.path import safe_path from galaxy.util.sanitize_text import sanitize_text # Example 1: Safely resolve a path component unsafe_path_component = '../etc/passwd' safe_component = safe_path(unsafe_path_component) print(f"Unsafe: {unsafe_path_component}, Safe: {safe_component}") # Example 2: Sanitize text input raw_text = '<script>alert("XSS")</script>Hello & World!' sanitized_text = sanitize_text(raw_text) print(f"Raw: {raw_text}\nSanitized: {sanitized_text}")
Debug
Known issues
breakingAPIs within `galaxy.util` can change significantly between major Galaxy releases (e.g., v25 to v26). As an internal utility package, modules, functions, or their signatures might be refactored, moved, or removed without explicit deprecation warnings targeted at external users.
fix
Refer to the Galaxy project's official release notes and source code (`lib/galaxy/util` directory in the main Galaxy repository) for the specific version you are using to confirm API stability and correct usage.
affects: All versions, especially major increments.
gotchaThe `galaxy-util` package is primarily designed for internal use within the Galaxy project. Its APIs are tightly coupled with the larger Galaxy application's internal structure and evolution, and may not always be suitable or stable for standalone, general-purpose use outside of the Galaxy ecosystem.
fix
Consider if a more general-purpose Python library exists for your specific utility need before integrating `galaxy-util` into non-Galaxy applications. Be prepared for potential API instability if you do use it externally.
affects: All versions
gotchaVersion mismatches between `galaxy-util` and the main `galaxy` package (if you are developing for Galaxy) can lead to unexpected behavior, `AttributeError`s, or runtime failures, as they are developed and released in tandem.
fix
Ensure that your `galaxy-util` version is compatible with your `galaxy` core version. Ideally, manage dependencies through the main Galaxy project's recommended setup or requirements.txt.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'galaxy.util'
The `galaxy-util` package has not been installed, or your Python environment's path does not include the installation location.
fix
Ensure the package is installed: `pip install galaxy-util`. If using a virtual environment, ensure it's activated.
AttributeError: module 'galaxy.util.path' has no attribute 'some_function_name'
The specific utility function or class you are trying to import/use (`some_function_name`) was removed, renamed, or refactored in the version of `galaxy-util` you have installed. This is common due to its internal utility nature.
fix
Check the `galaxy.util` source code in the Galaxy project's GitHub repository (`lib/galaxy/util` for your specific version) to find the current API or an alternative. Update your code to reflect the new API.
ImportError: cannot import name 'SomeSpecificClass' from 'galaxy.util.tool_shed'
A class or function previously available in a submodule of `galaxy.util` has been moved to a different module, or it has been removed entirely during a refactoring.
fix
Consult the Galaxy project's official documentation or examine the source code for the exact `galaxy-util` version you are using to determine the correct import path or if the functionality has been replaced.
Upgrade
Version history
26.0.1latest on PyPI · released Jun 7, 2026
Audit
Dependencies
pythonrequiredRequired Python version for compatibility.
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
galaxy-util — pip install galaxy-util · libregistry