Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy package

Galaxy root package – this is a namespace package.

Subpackages

Submodules

galaxy.app module

class galaxy.app.ConfiguresGalaxyMixin[source]

Bases: object

Shared code for configuring Galaxy-like app objects.

tool_dependency_dir
wait_for_toolbox_reload(old_toolbox)[source]
class galaxy.app.ExecutionTimerFactory(config)[source]

Bases: object

__init__(config)[source]
get_timer(*args, **kwd)[source]
class galaxy.app.GalaxyManagerApplication(configure_logging=True, **kwargs)[source]

Bases: galaxy.structured_app.MinimalManagerApp, galaxy.app.MinimalGalaxyApplication

Extends the MinimalGalaxyApplication with most managers that are not tied to a web or job handling context.

__init__(configure_logging=True, **kwargs)[source]
class galaxy.app.HaltableContainer → None[source]

Bases: galaxy.di.Container

__init__() → None[source]
shutdown()[source]
class galaxy.app.MinimalGalaxyApplication(fsmon=False, **kwargs) → None[source]

Bases: galaxy.structured_app.BasicSharedApp, galaxy.app.ConfiguresGalaxyMixin, galaxy.app.HaltableContainer, galaxy.app.SentryClientMixin

Encapsulates the state of a minimal Galaxy application

__init__(fsmon=False, **kwargs) → None[source]
configure_fluent_log()[source]
class galaxy.app.SentryClientMixin[source]

Bases: object

configure_sentry_client()[source]
class galaxy.app.StatsdStructuredExecutionTimer(galaxy_statsd_client, *args, **kwds)[source]

Bases: galaxy.util.StructuredExecutionTimer

__init__(galaxy_statsd_client, *args, **kwds)[source]
to_str(**kwd)[source]
class galaxy.app.UniverseApplication(**kwargs) → None[source]

Bases: galaxy.structured_app.StructuredApp, galaxy.app.GalaxyManagerApplication

Encapsulates the state of a Universe application

__init__(**kwargs) → None[source]
is_job_handler

galaxy.config_watchers module

class galaxy.config_watchers.ConfigWatchers(app: galaxy.structured_app.StructuredApp)[source]

Bases: object

Contains ToolConfWatcher, ToolWatcher and ToolDataWatcher objects.

__init__(app: galaxy.structured_app.StructuredApp)[source]
watchers
change_state(active)[source]
start()[source]
shutdown()[source]
update_watch_data_table_paths()[source]
data_manager_configs
tool_data_paths
tool_config_paths
job_rules_paths

galaxy.main module

Entry point for starting Galaxy without starting as part of a web server.

Example Usage: Start a job/workflow handler without a web server and with a given name using.

galaxy-main –server-name handler0

Start as a daemon with (requires daemonized - install with ‘pip install daemonize’):

galaxy-main -d –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –server-name handler0

In daemon mode logging of Galaxy (as opposed to this script) is configured via a loggers section in Galaxy’s ini file - this can be overridden with sensible defaults logging to a single file with the following:

galaxy-main -d –server-name handler0 –daemon-log-file=handler0-daemon.log –pid-file handler0.pid –log-file handler0.log

This can also be used to start Galaxy as a uWSGI mule, e.g. for job handling:

uwsgi … –py-call-osafterfork –mule=lib/galaxy/main.py –mule=lib/galaxy/main.py –farm=job-handlers:1,2

The –py-call-osafterfork allows for proper shutdown on SIGTERM/SIGINT.

class galaxy.main.GalaxyConfigBuilder(args=None, **kwds)[source]

Bases: object

Generate paste-like configuration from supplied command-line arguments.

__init__(args=None, **kwds)[source]
app_kwds()[source]
config_is_ini
global_conf()[source]
classmethod populate_options(arg_parser)[source]
setup_logging()[source]
galaxy.main.app_loop(args, log)[source]
galaxy.main.handle_signal(signum, frame)[source]
galaxy.main.load_galaxy_app(config_builder, config_env=False, log=None, attach_to_pools=None, **kwds)[source]
galaxy.main.main(func=<function app_loop>)[source]
galaxy.main.register_signals()[source]

galaxy.queue_worker module

Galaxy control queue and worker. This is used to handle ‘app’ control like reloading the toolbox, etc., across multiple processes.

class galaxy.queue_worker.ControlTask(queue_worker)[source]

Bases: object

__init__(queue_worker)[source]
connection
control_queues
declare_queues
exchange
on_response(message)[source]
send_task(payload, routing_key, local=False, get_response=False, timeout=10)[source]
class galaxy.queue_worker.GalaxyQueueWorker(app, task_mapping=None)[source]

Bases: kombu.mixins.ConsumerProducerMixin, threading.Thread

This is a flexible worker for galaxy’s queues. Each process, web or handler, will have one of these used for dispatching so called ‘control’ tasks.

__init__(app, task_mapping=None)[source]
bind_and_start()[source]
declare_queues
get_consumers(Consumer, channel)[source]
process_task(body, message)[source]
send_control_task(task, noop_self=False, get_response=False, routing_key='control.*', kwargs=None)[source]
send_local_control_task(task, get_response=False, kwargs=None)[source]
shutdown()[source]
galaxy.queue_worker.admin_job_lock(app, **kwargs)[source]
galaxy.queue_worker.create_panel_section(app, **kwargs)[source]

Updates in memory toolbox dictionary.

galaxy.queue_worker.job_rule_modules(app)[source]
galaxy.queue_worker.rebuild_toolbox_search_index(app, **kwargs)[source]
galaxy.queue_worker.recalculate_user_disk_usage(app, **kwargs)[source]
galaxy.queue_worker.reconfigure_watcher(app, **kwargs)[source]
galaxy.queue_worker.reload_core_config(app, **kwargs)[source]
galaxy.queue_worker.reload_data_managers(app, **kwargs)[source]
galaxy.queue_worker.reload_display_application(app, **kwargs)[source]
galaxy.queue_worker.reload_job_rules(app, **kwargs)[source]
galaxy.queue_worker.reload_sanitize_allowlist(app)[source]
galaxy.queue_worker.reload_tool(app, **kwargs)[source]
galaxy.queue_worker.reload_tool_data_tables(app, **kwargs)[source]
galaxy.queue_worker.reload_toolbox(app, save_integrated_tool_panel=True, **kwargs)[source]
galaxy.queue_worker.reload_tour(app, **kwargs)[source]
galaxy.queue_worker.send_control_task(app, task, noop_self=False, get_response=False, routing_key='control.*', kwargs=None)[source]

This sends a control task out to all processes, useful for things like reloading a data table, which needs to happen individually in all processes. Set noop_self to True to not run task for current process. Set get_response to True to wait for and return the task results as a list.

galaxy.queue_worker.send_local_control_task(app, task, get_response=False, kwargs=None)[source]

This sends a message to the process-local control worker, which is useful for one-time asynchronous tasks like recalculating user disk usage.

galaxy.queues module

All message queues used by Galaxy

galaxy.queues.all_control_queues_for_declare(application_stack)[source]

For in-memory routing (used by sqlalchemy-based transports), we need to be able to build the entire routing table in producers.

galaxy.queues.connection_from_config(config) → typing.Optional[kombu.connection.Connection][source]
galaxy.queues.control_queues_from_config(config)[source]

Returns a Queue instance with the correct name and routing key for this galaxy process’s config

galaxy.version module