Warning

This document is for an old release 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.model package

Galaxy data model classes

Naming: try to use class names that have a distinct plural form so that the relationship cardinalities are obvious (e.g. prefer Dataset to Data)

galaxy.model.now()

Return a new datetime representing UTC day and time.

galaxy.model.get_uuid(uuid: Optional[Union[UUID, str]] = None) UUID[source]
class galaxy.model.Base(**kwargs)[source]

Bases: object

registry = <sqlalchemy.orm.decl_api.registry object>
metadata = MetaData()
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class galaxy.model.RepresentById[source]

Bases: object

id: int
exception galaxy.model.NoConverterException(value)[source]

Bases: Exception

__init__(value)[source]
exception galaxy.model.ConverterDependencyException(value)[source]

Bases: Exception

__init__(value)[source]
galaxy.model.set_datatypes_registry(d_registry)[source]

Set up datatypes_registry

class galaxy.model.HasTags[source]

Bases: object

dict_collection_visible_keys = ['tags']
dict_element_visible_keys = ['tags']
tags: List[ItemTagAssociation]
to_dict(*args, **kwargs)[source]
make_tag_string_list()[source]
copy_tags_from(target_user, source)[source]
property auto_propagated_tags
class galaxy.model.SerializeFilesHandler(*args, **kwds)[source]

Bases: Protocol

serialize_files(dataset: DatasetInstance, as_dict: Dict[str, Any]) None[source]
__init__(*args, **kwargs)
class galaxy.model.SerializationOptions(for_edit: bool, serialize_dataset_objects: Optional[bool] = None, serialize_files_handler: Optional[SerializeFilesHandler] = None, strip_metadata_files: Optional[bool] = None)[source]

Bases: object

__init__(for_edit: bool, serialize_dataset_objects: Optional[bool] = None, serialize_files_handler: Optional[SerializeFilesHandler] = None, strip_metadata_files: Optional[bool] = None) None[source]
attach_identifier(id_encoder, obj, ret_val)[source]
get_identifier(id_encoder, obj)[source]
get_identifier_for_id(id_encoder, obj_id)[source]
serialize_files(dataset, as_dict)[source]
class galaxy.model.Serializable[source]

Bases: RepresentById

serialize(id_encoder: IdEncodingHelper, serialization_options: SerializationOptions, for_link: bool = False) Dict[str, Any][source]

Serialize model for a re-population in (potentially) another Galaxy instance.

id: int
class galaxy.model.HasName[source]

Bases: object

get_display_name()[source]

These objects have a name attribute can be either a string or a unicode object. If string, convert to unicode object assuming ‘utf-8’ format.

class galaxy.model.UsesCreateAndUpdateTime[source]

Bases: object

update_time: DateTime
property seconds_since_updated
property seconds_since_created
update()[source]
class galaxy.model.WorkerProcess(**kwargs)[source]

Bases: Base, UsesCreateAndUpdateTime

id
server_name
hostname
pid
update_time: DateTime
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

galaxy.model.cached_id(galaxy_model_object)[source]

Get model object id attribute without a firing a database query.

Useful to fetching the id of a typical Galaxy model object after a flush, where SA is going to mark the id attribute as unloaded but we know the id is immutable and so we can use the database identity to fetch.

With Galaxy’s default SA initialization - any flush marks all attributes as unloaded - even objects completely unrelated to the flushed changes and even attributes we know to be immutable like id. See test_galaxy_mapping.py for verification of this behavior. This method is a workaround that uses the fact that we know all Galaxy objects use the id attribute as identity and SA internals (_sa_instance_state) to infer the previously loaded ID value. I tried digging into the SA internals extensively and couldn’t find a way to get the previously loaded values after a flush to allow a generalization of this for other attributes.

class galaxy.model.JobLike[source]

Bases: object

MAX_NUMERIC = 9999999999999999999
add_metric(plugin, metric_name, metric_value)[source]
property metrics
set_streams(tool_stdout, tool_stderr, job_stdout=None, job_stderr=None, job_messages=None)[source]
log_str()[source]
property stdout
property stderr
class galaxy.model.User(email=None, password=None, username=None)[source]

Bases: Base, Dictifiable, RepresentById

Data for a Galaxy user or admin and relations to their histories, credentials, and roles.

use_pbkdf2 = True
bootstrap_admin_user = False
id: int
create_time
update_time
last_password_change
form_values_id
disk_usage
activation_token
addresses
cloudauthz
custos_auth
default_permissions
groups
histories
active_histories
galaxy_sessions
quotas
social_auth
stored_workflow_menu_entries
values
api_keys: List[APIKeys]
data_manager_histories
roles
stored_workflows
non_private_roles
preferences: association_proxy = ColumnAssociationProxyInstance(AssociationProxy('_preferences', 'value'))
dict_collection_visible_keys = ['id', 'email', 'username', 'deleted', 'active', 'last_password_change']
dict_element_visible_keys = ['id', 'email', 'username', 'total_disk_usage', 'nice_total_disk_usage', 'deleted', 'active', 'last_password_change']
__init__(email=None, password=None, username=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

email
password
external
deleted
purged
active
username
property extra_preferences
set_password_cleartext(cleartext)[source]

Set user password to the digest of cleartext.

set_random_password(length=16)[source]

Sets user password to a random string of the given length. :return: void

check_password(cleartext)[source]

Check if cleartext matches user password when hashed.

system_user_pwent(real_system_username)[source]

Gives the system user pwent entry based on e-mail or username depending on the value in real_system_username

all_roles()[source]

Return a unique list of Roles associated with this user or any of their groups.

all_roles_exploiting_cache()[source]
get_disk_usage(nice_size=False)[source]

Return byte count of disk space used by user or a human-readable string if nice_size is True.

set_disk_usage(bytes)[source]

Manually set the disk space used by a user to bytes.

property total_disk_usage

Return byte count of disk space used by user or a human-readable string if nice_size is True.

adjust_total_disk_usage(amount)[source]
property nice_total_disk_usage

Return byte count of disk space used in a human-readable string.

calculate_disk_usage()[source]

Return byte count total of disk space used by all non-purged, non-library HDAs in non-purged histories.

calculate_and_set_disk_usage()[source]

Calculates and sets user disk usage.

static user_template_environment(user)[source]
>>> env = User.user_template_environment(None)
>>> env['__user_email__']
'Anonymous'
>>> env['__user_id__']
'Anonymous'
>>> user = User('foo@example.com')
>>> user.id = 6
>>> user.username = 'foo2'
>>> env = User.user_template_environment(user)
>>> env['__user_id__']
'6'
>>> env['__user_name__']
'foo2'
static expand_user_properties(user, in_string)[source]
is_active()[source]
is_authenticated()[source]
attempt_create_private_role()[source]
class galaxy.model.PasswordResetToken(user, token=None)[source]

Bases: Base

user_id
__init__(user, token=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

token
user
expiration_time
table = Table('password_reset_token', MetaData(), Column('token', String(length=32), table=<password_reset_token>, primary_key=True, nullable=False), Column('expiration_time', DateTime(), table=<password_reset_token>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<password_reset_token>), schema=None)
class galaxy.model.DynamicTool(active=True, hidden=True, **kwd)[source]

Bases: Base, Dictifiable, RepresentById

id: int
create_time
update_time
tool_id
tool_version
tool_format
tool_path
tool_directory
value
dict_collection_visible_keys = ('id', 'tool_id', 'tool_format', 'tool_version', 'uuid', 'active', 'hidden')
dict_element_visible_keys = ('id', 'tool_id', 'tool_format', 'tool_version', 'uuid', 'active', 'hidden')
__init__(active=True, hidden=True, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

active
hidden
uuid
table = Table('dynamic_tool', MetaData(), Column('id', Integer(), table=<dynamic_tool>, primary_key=True, nullable=False), Column('uuid', UUIDType(), table=<dynamic_tool>), Column('create_time', DateTime(), table=<dynamic_tool>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<dynamic_tool>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('tool_id', Unicode(length=255), table=<dynamic_tool>), Column('tool_version', Unicode(length=255), table=<dynamic_tool>), Column('tool_format', Unicode(length=255), table=<dynamic_tool>), Column('tool_path', Unicode(length=255), table=<dynamic_tool>), Column('tool_directory', Unicode(length=255), table=<dynamic_tool>), Column('hidden', Boolean(), table=<dynamic_tool>, default=ColumnDefault(True)), Column('active', Boolean(), table=<dynamic_tool>, default=ColumnDefault(True)), Column('value', MutableJSONType(), table=<dynamic_tool>), schema=None)
class galaxy.model.BaseJobMetric(plugin, metric_name, metric_value)[source]

Bases: Base

__init__(plugin, metric_name, metric_value)[source]

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

class galaxy.model.JobMetricText(plugin, metric_name, metric_value)[source]

Bases: BaseJobMetric, RepresentById

id: int
job_id
plugin
metric_name
metric_value
__init__(plugin, metric_name, metric_value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('job_metric_text', MetaData(), Column('id', Integer(), table=<job_metric_text>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_metric_text>), Column('plugin', Unicode(length=255), table=<job_metric_text>), Column('metric_name', Unicode(length=255), table=<job_metric_text>), Column('metric_value', Unicode(length=1023), table=<job_metric_text>), schema=None)
class galaxy.model.JobMetricNumeric(plugin, metric_name, metric_value)[source]

Bases: BaseJobMetric, RepresentById

id: int
job_id
plugin
metric_name
metric_value
__init__(plugin, metric_name, metric_value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('job_metric_numeric', MetaData(), Column('id', Integer(), table=<job_metric_numeric>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_metric_numeric>), Column('plugin', Unicode(length=255), table=<job_metric_numeric>), Column('metric_name', Unicode(length=255), table=<job_metric_numeric>), Column('metric_value', Numeric(precision=26, scale=7), table=<job_metric_numeric>), schema=None)
class galaxy.model.TaskMetricText(plugin, metric_name, metric_value)[source]

Bases: BaseJobMetric, RepresentById

id: int
task_id
plugin
metric_name
metric_value
__init__(plugin, metric_name, metric_value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('task_metric_text', MetaData(), Column('id', Integer(), table=<task_metric_text>, primary_key=True, nullable=False), Column('task_id', Integer(), ForeignKey('task.id'), table=<task_metric_text>), Column('plugin', Unicode(length=255), table=<task_metric_text>), Column('metric_name', Unicode(length=255), table=<task_metric_text>), Column('metric_value', Unicode(length=1023), table=<task_metric_text>), schema=None)
class galaxy.model.TaskMetricNumeric(plugin, metric_name, metric_value)[source]

Bases: BaseJobMetric, RepresentById

id: int
task_id
plugin
metric_name
metric_value
__init__(plugin, metric_name, metric_value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('task_metric_numeric', MetaData(), Column('id', Integer(), table=<task_metric_numeric>, primary_key=True, nullable=False), Column('task_id', Integer(), ForeignKey('task.id'), table=<task_metric_numeric>), Column('plugin', Unicode(length=255), table=<task_metric_numeric>), Column('metric_name', Unicode(length=255), table=<task_metric_numeric>), Column('metric_value', Numeric(precision=26, scale=7), table=<task_metric_numeric>), schema=None)
class galaxy.model.IoDicts(inp_data, out_data, out_collections)[source]

Bases: tuple

property inp_data

Alias for field number 0

property out_data

Alias for field number 1

property out_collections

Alias for field number 2

class galaxy.model.Job[source]

Bases: Base, JobLike, UsesCreateAndUpdateTime, Dictifiable, Serializable

A job represents a request to run a tool given input datasets, tool parameters, and output datasets.

id: int
create_time
update_time: DateTime
history_id
library_folder_id
tool_id
tool_version
galaxy_version
dynamic_tool_id
info
copied_from_job_id
command_line
job_messages
param_filename
runner_name
job_stdout
job_stderr
tool_stdout
tool_stderr
exit_code
traceback
session_id
user_id
job_runner_name
job_runner_external_id
destination_id
destination_params
object_store_id
params
handler
user
galaxy_session
history
library_folder
parameters
input_datasets
input_dataset_collections
input_dataset_collection_elements
output_dataset_collection_instances
output_dataset_collections
post_job_actions
input_library_datasets
output_library_datasets
external_output_metadata
tasks
output_datasets
state_history
text_metrics
numeric_metrics
interactivetool_entry_points
implicit_collection_jobs_association
container
data_manager_association
history_dataset_collection_associations
workflow_invocation_step
any_output_dataset_collection_instances_deleted: column_property
any_output_dataset_deleted: column_property
dict_collection_visible_keys = ['id', 'state', 'exit_code', 'update_time', 'create_time', 'galaxy_version']
dict_element_visible_keys = ['id', 'state', 'exit_code', 'update_time', 'create_time', 'galaxy_version', 'command_version']
class states(value)[source]

Bases: str, Enum

An enumeration.

NEW = 'new'
RESUBMITTED = 'resubmitted'
UPLOAD = 'upload'
WAITING = 'waiting'
QUEUED = 'queued'
RUNNING = 'running'
OK = 'ok'
ERROR = 'error'
FAILED = 'failed'
PAUSED = 'paused'
DELETING = 'deleting'
DELETED = 'deleted'
DELETED_NEW = 'deleted_new'
STOPPING = 'stop'
STOPPED = 'stopped'
SKIPPED = 'skipped'
terminal_states = [<states.OK: 'ok'>, <states.ERROR: 'error'>, <states.DELETED: 'deleted'>]
non_ready_states = [<states.NEW: 'new'>, <states.RESUBMITTED: 'resubmitted'>, <states.UPLOAD: 'upload'>, <states.WAITING: 'waiting'>, <states.QUEUED: 'queued'>, <states.RUNNING: 'running'>]

job states where the job hasn’t finished and the model may still change

__init__()

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

dependencies
state
imported
property running
property finished
io_dicts(exclude_implicit_outputs=False) IoDicts[source]
get_external_output_metadata()[source]

The external_output_metadata is currently a reference from Job to JobExternalOutputMetadata. It exists for a job but not a task.

get_session_id()[source]
get_user_id()[source]
get_tool_id()[source]
get_tool_version()[source]
get_command_line()[source]
get_dependencies()[source]
get_param_filename()[source]
get_parameters()[source]
get_copied_from_job_id()[source]
get_input_datasets()[source]
get_output_datasets()[source]
get_input_library_datasets()[source]
get_output_library_datasets()[source]
get_state()[source]
get_info()[source]
get_job_runner_name()[source]
get_job_runner_external_id()[source]
get_post_job_actions()[source]
get_imported()[source]
get_handler()[source]
get_params()[source]
get_user()[source]
get_tasks()[source]
get_id_tag()[source]

Return a tag that can be useful in identifying a Job. This returns the Job’s get_id

set_session_id(session_id)[source]
set_user_id(user_id)[source]
set_tool_id(tool_id)[source]
get_user_email()[source]
set_tool_version(tool_version)[source]
set_command_line(command_line)[source]
set_dependencies(dependencies)[source]
set_param_filename(param_filename)[source]
set_parameters(parameters)[source]
set_copied_from_job_id(job_id)[source]
set_input_datasets(input_datasets)[source]
set_output_datasets(output_datasets)[source]
set_input_library_datasets(input_library_datasets)[source]
set_output_library_datasets(output_library_datasets)[source]
set_info(info)[source]
set_runner_name(job_runner_name)[source]
get_job()[source]
set_runner_external_id(job_runner_external_id)[source]
set_post_job_actions(post_job_actions)[source]
set_imported(imported)[source]
set_handler(handler)[source]
set_params(params)[source]
add_parameter(name, value)[source]
add_input_dataset(name, dataset=None, dataset_id=None)[source]
add_output_dataset(name, dataset)[source]
add_input_dataset_collection(name, dataset_collection)[source]
add_input_dataset_collection_element(name, dataset_collection_element)[source]
add_output_dataset_collection(name, dataset_collection_instance)[source]
add_implicit_output_dataset_collection(name, dataset_collection)[source]
add_input_library_dataset(name, dataset)[source]
add_output_library_dataset(name, dataset)[source]
add_post_job_action(pja)[source]
property all_entry_points_configured
set_state(state)[source]

Save state history

get_param_values(app, ignore_errors=False)[source]

Read encoded parameter values from the database and turn back into a dict of tool parameter values.

raw_param_dict()[source]
check_if_output_datasets_deleted()[source]

Return true if all of the output datasets associated with this job are in the deleted state

mark_stopped(track_jobs_in_database=False)[source]

Mark this job as stopped

mark_deleted(track_jobs_in_database=False)[source]

Mark this job as deleted, and mark any output datasets as discarded.

mark_failed(info='Job execution failed', blurb=None, peek=None)[source]

Mark this job as failed, and mark any output datasets as errored.

resume(flush=True)[source]
to_dict(view='collection', system_details=False)[source]

Return item dictionary.

update_hdca_update_time_for_job(update_time, sa_session, supports_skip_locked)[source]
set_final_state(final_state, supports_skip_locked)[source]
get_destination_configuration(dest_params, config, key, default=None)[source]

Get a destination parameter that can be defaulted back in specified config if it needs to be applied globally.

property command_version
update_output_states(supports_skip_locked)[source]
remappable()[source]

Check whether job is remappable when rerun

hide_outputs(flush=True)[source]
table = Table('job', MetaData(), Column('id', Integer(), table=<job>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<job>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<job>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('history_id', Integer(), ForeignKey('history.id'), table=<job>), Column('library_folder_id', Integer(), ForeignKey('library_folder.id'), table=<job>), Column('tool_id', String(length=255), table=<job>), Column('tool_version', TEXT(), table=<job>, default=ColumnDefault('1.0.0')), Column('galaxy_version', String(length=64), table=<job>), Column('dynamic_tool_id', Integer(), ForeignKey('dynamic_tool.id'), table=<job>), Column('state', String(length=64), table=<job>), Column('info', TrimmedString(length=255), table=<job>), Column('copied_from_job_id', Integer(), table=<job>), Column('command_line', TEXT(), table=<job>), Column('dependencies', MutableJSONType(), table=<job>), Column('job_messages', MutableJSONType(), table=<job>), Column('param_filename', String(length=1024), table=<job>), Column('runner_name', String(length=255), table=<job>), Column('job_stdout', TEXT(), table=<job>), Column('job_stderr', TEXT(), table=<job>), Column('tool_stdout', TEXT(), table=<job>), Column('tool_stderr', TEXT(), table=<job>), Column('exit_code', Integer(), table=<job>), Column('traceback', TEXT(), table=<job>), Column('session_id', Integer(), ForeignKey('galaxy_session.id'), table=<job>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<job>), Column('job_runner_name', String(length=255), table=<job>), Column('job_runner_external_id', String(length=255), table=<job>), Column('destination_id', String(length=255), table=<job>), Column('destination_params', MutableJSONType(), table=<job>), Column('object_store_id', TrimmedString(length=255), table=<job>), Column('imported', Boolean(), table=<job>, default=ColumnDefault(False)), Column('params', TrimmedString(length=255), table=<job>), Column('handler', TrimmedString(length=255), table=<job>), schema=None)
class galaxy.model.Task(job, working_directory, prepare_files_cmd)[source]

Bases: Base, JobLike, RepresentById

A task represents a single component of a job.

id: int
create_time
execution_time
update_time
command_line
param_filename
runner_name
job_stdout
job_stderr
tool_stdout
tool_stderr
exit_code
job_messages
info
traceback
job_id
task_runner_name
task_runner_external_id
text_metrics
numeric_metrics
class states(value)[source]

Bases: str, Enum

An enumeration.

NEW = 'new'
WAITING = 'waiting'
QUEUED = 'queued'
RUNNING = 'running'
OK = 'ok'
ERROR = 'error'
DELETED = 'deleted'
__init__(job, working_directory, prepare_files_cmd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

state
working_directory
job
prepare_input_files_cmd
get_param_values(app)[source]

Read encoded parameter values from the database and turn back into a dict of tool parameter values.

get_id_tag()[source]

Return an id tag suitable for identifying the task. This combines the task’s job id and the task’s own id.

get_command_line()[source]
get_parameters()[source]
get_state()[source]
get_info()[source]
get_working_directory()[source]
get_task_runner_name()[source]
get_task_runner_external_id()[source]
get_job()[source]
get_prepare_input_files_cmd()[source]
get_external_output_metadata()[source]

The external_output_metadata is currently a backref to JobExternalOutputMetadata. It exists for a job but not a task, and when a task is cancelled its corresponding parent Job will be cancelled. So None is returned now, but that could be changed to self.get_job().get_external_output_metadata().

get_job_runner_name()[source]

Since runners currently access Tasks the same way they access Jobs, this method just refers to this instance’s runner.

get_job_runner_external_id()[source]

Runners will use the same methods to get information about the Task class as they will about the Job class, so this method just returns the task’s external id.

get_session_id()[source]
set_id(id)[source]
set_command_line(command_line)[source]
set_parameters(parameters)[source]
set_state(state)[source]
set_info(info)[source]
set_working_directory(working_directory)[source]
set_task_runner_name(task_runner_name)[source]
set_job_runner_external_id(task_runner_external_id)[source]
set_task_runner_external_id(task_runner_external_id)[source]
set_job(job)[source]
set_prepare_input_files_cmd(prepare_input_files_cmd)[source]
table = Table('task', MetaData(), Column('id', Integer(), table=<task>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<task>, default=ColumnDefault(<function datetime.utcnow>)), Column('execution_time', DateTime(), table=<task>), Column('update_time', DateTime(), table=<task>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('state', String(length=64), table=<task>), Column('command_line', TEXT(), table=<task>), Column('param_filename', String(length=1024), table=<task>), Column('runner_name', String(length=255), table=<task>), Column('job_stdout', TEXT(), table=<task>), Column('job_stderr', TEXT(), table=<task>), Column('tool_stdout', TEXT(), table=<task>), Column('tool_stderr', TEXT(), table=<task>), Column('exit_code', Integer(), table=<task>), Column('job_messages', MutableJSONType(), table=<task>), Column('info', TrimmedString(length=255), table=<task>), Column('traceback', TEXT(), table=<task>), Column('job_id', Integer(), ForeignKey('job.id'), table=<task>, nullable=False), Column('working_directory', String(length=1024), table=<task>), Column('task_runner_name', String(length=255), table=<task>), Column('task_runner_external_id', String(length=255), table=<task>), Column('prepare_input_files_cmd', TEXT(), table=<task>), schema=None)
class galaxy.model.JobParameter(name, value)[source]

Bases: Base, RepresentById

id: int
job_id
__init__(name, value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
value
copy()[source]
table = Table('job_parameter', MetaData(), Column('id', Integer(), table=<job_parameter>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_parameter>), Column('name', String(length=255), table=<job_parameter>), Column('value', TEXT(), table=<job_parameter>), schema=None)
class galaxy.model.JobToInputDatasetAssociation(name, dataset)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_id
job
__init__(name, dataset)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset
dataset_version
table = Table('job_to_input_dataset', MetaData(), Column('id', Integer(), table=<job_to_input_dataset>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_input_dataset>), Column('dataset_id', Integer(), ForeignKey('history_dataset_association.id'), table=<job_to_input_dataset>), Column('dataset_version', Integer(), table=<job_to_input_dataset>), Column('name', String(length=255), table=<job_to_input_dataset>), schema=None)
class galaxy.model.JobToOutputDatasetAssociation(name, dataset)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_id
job
__init__(name, dataset)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset
property item
table = Table('job_to_output_dataset', MetaData(), Column('id', Integer(), table=<job_to_output_dataset>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_output_dataset>), Column('dataset_id', Integer(), ForeignKey('history_dataset_association.id'), table=<job_to_output_dataset>), Column('name', String(length=255), table=<job_to_output_dataset>), schema=None)
class galaxy.model.JobToInputDatasetCollectionAssociation(name, dataset_collection)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_collection_id
job
__init__(name, dataset_collection)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset_collection
table = Table('job_to_input_dataset_collection', MetaData(), Column('id', Integer(), table=<job_to_input_dataset_collection>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_input_dataset_collection>), Column('dataset_collection_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<job_to_input_dataset_collection>), Column('name', String(length=255), table=<job_to_input_dataset_collection>), schema=None)
class galaxy.model.JobToInputDatasetCollectionElementAssociation(name, dataset_collection_element)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_collection_element_id
job
__init__(name, dataset_collection_element)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset_collection_element
table = Table('job_to_input_dataset_collection_element', MetaData(), Column('id', Integer(), table=<job_to_input_dataset_collection_element>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_input_dataset_collection_element>), Column('dataset_collection_element_id', Integer(), ForeignKey('dataset_collection_element.id'), table=<job_to_input_dataset_collection_element>), Column('name', Unicode(length=255), table=<job_to_input_dataset_collection_element>), schema=None)
class galaxy.model.JobToOutputDatasetCollectionAssociation(name, dataset_collection_instance)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_collection_id
job
__init__(name, dataset_collection_instance)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset_collection_instance
property item
table = Table('job_to_output_dataset_collection', MetaData(), Column('id', Integer(), table=<job_to_output_dataset_collection>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_output_dataset_collection>), Column('dataset_collection_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<job_to_output_dataset_collection>), Column('name', Unicode(length=255), table=<job_to_output_dataset_collection>), schema=None)
class galaxy.model.JobToImplicitOutputDatasetCollectionAssociation(name, dataset_collection)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_collection_id
job
__init__(name, dataset_collection)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset_collection
table = Table('job_to_implicit_output_dataset_collection', MetaData(), Column('id', Integer(), table=<job_to_implicit_output_dataset_collection>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_implicit_output_dataset_collection>), Column('dataset_collection_id', Integer(), ForeignKey('dataset_collection.id'), table=<job_to_implicit_output_dataset_collection>), Column('name', Unicode(length=255), table=<job_to_implicit_output_dataset_collection>), schema=None)
class galaxy.model.JobToInputLibraryDatasetAssociation(name, dataset)[source]

Bases: Base, RepresentById

id: int
job_id
ldda_id
job
__init__(name, dataset)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset
table = Table('job_to_input_library_dataset', MetaData(), Column('id', Integer(), table=<job_to_input_library_dataset>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_input_library_dataset>), Column('ldda_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<job_to_input_library_dataset>), Column('name', Unicode(length=255), table=<job_to_input_library_dataset>), schema=None)
class galaxy.model.JobToOutputLibraryDatasetAssociation(name, dataset)[source]

Bases: Base, RepresentById

id: int
job_id
ldda_id
job
__init__(name, dataset)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
dataset
table = Table('job_to_output_library_dataset', MetaData(), Column('id', Integer(), table=<job_to_output_library_dataset>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_to_output_library_dataset>), Column('ldda_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<job_to_output_library_dataset>), Column('name', Unicode(length=255), table=<job_to_output_library_dataset>), schema=None)
class galaxy.model.JobStateHistory(job)[source]

Bases: Base, RepresentById

id: int
create_time
__init__(job)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

job_id
state
info
table = Table('job_state_history', MetaData(), Column('id', Integer(), table=<job_state_history>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<job_state_history>, default=ColumnDefault(<function datetime.utcnow>)), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_state_history>), Column('state', String(length=64), table=<job_state_history>), Column('info', TrimmedString(length=255), table=<job_state_history>), schema=None)
class galaxy.model.ImplicitlyCreatedDatasetCollectionInput(name, input_dataset_collection)[source]

Bases: Base, RepresentById

id: int
dataset_collection_id
input_dataset_collection_id
__init__(name, input_dataset_collection)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
input_dataset_collection
table = Table('implicitly_created_dataset_collection_inputs', MetaData(), Column('id', Integer(), table=<implicitly_created_dataset_collection_inputs>, primary_key=True, nullable=False), Column('dataset_collection_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<implicitly_created_dataset_collection_inputs>), Column('input_dataset_collection_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<implicitly_created_dataset_collection_inputs>), Column('name', Unicode(length=255), table=<implicitly_created_dataset_collection_inputs>), schema=None)
class galaxy.model.ImplicitCollectionJobs(populated_state=None)[source]

Bases: Base, Serializable

id: int
jobs
class populated_states(value)[source]

Bases: str, Enum

An enumeration.

NEW = 'new'
OK = 'ok'
FAILED = 'failed'
__init__(populated_state=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

populated_state
property job_list
table = Table('implicit_collection_jobs', MetaData(), Column('id', Integer(), table=<implicit_collection_jobs>, primary_key=True, nullable=False), Column('populated_state', TrimmedString(length=64), table=<implicit_collection_jobs>, nullable=False, default=ColumnDefault('new')), schema=None)
class galaxy.model.ImplicitCollectionJobsJobAssociation(**kwargs)[source]

Bases: Base, RepresentById

id: int
implicit_collection_jobs_id
job_id
order_index
implicit_collection_jobs
job
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('implicit_collection_jobs_job_association', MetaData(), Column('id', Integer(), table=<implicit_collection_jobs_job_association>, primary_key=True, nullable=False), Column('implicit_collection_jobs_id', Integer(), ForeignKey('implicit_collection_jobs.id'), table=<implicit_collection_jobs_job_association>), Column('job_id', Integer(), ForeignKey('job.id'), table=<implicit_collection_jobs_job_association>), Column('order_index', Integer(), table=<implicit_collection_jobs_job_association>, nullable=False), schema=None)
class galaxy.model.PostJobAction(action_type, workflow_step=None, output_name=None, action_arguments=None)[source]

Bases: Base, RepresentById

id: int
workflow_step_id
__init__(action_type, workflow_step=None, output_name=None, action_arguments=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action_type
output_name
action_arguments
workflow_step
table = Table('post_job_action', MetaData(), Column('id', Integer(), table=<post_job_action>, primary_key=True, nullable=False), Column('workflow_step_id', Integer(), ForeignKey('workflow_step.id'), table=<post_job_action>), Column('action_type', String(length=255), table=<post_job_action>, nullable=False), Column('output_name', String(length=255), table=<post_job_action>), Column('action_arguments', MutableJSONType(), table=<post_job_action>), schema=None)
class galaxy.model.PostJobActionAssociation(pja, job=None, job_id=None)[source]

Bases: Base, RepresentById

id: int
post_job_action_id
__init__(pja, job=None, job_id=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

job
job_id
post_job_action
table = Table('post_job_action_association', MetaData(), Column('id', Integer(), table=<post_job_action_association>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<post_job_action_association>, nullable=False), Column('post_job_action_id', Integer(), ForeignKey('post_job_action.id'), table=<post_job_action_association>, nullable=False), schema=None)
class galaxy.model.JobExternalOutputMetadata(job=None, dataset=None)[source]

Bases: Base, RepresentById

id: int
job_id
history_dataset_association_id
library_dataset_dataset_association_id
is_valid
filename_in
filename_out
filename_results_code
filename_kwds
filename_override_metadata
job_runner_external_pid
__init__(job=None, dataset=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

job
history_dataset_association
library_dataset_dataset_association
property dataset
table = Table('job_external_output_metadata', MetaData(), Column('id', Integer(), table=<job_external_output_metadata>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_external_output_metadata>), Column('history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<job_external_output_metadata>), Column('library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<job_external_output_metadata>), Column('is_valid', Boolean(), table=<job_external_output_metadata>, default=ColumnDefault(True)), Column('filename_in', String(length=255), table=<job_external_output_metadata>), Column('filename_out', String(length=255), table=<job_external_output_metadata>), Column('filename_results_code', String(length=255), table=<job_external_output_metadata>), Column('filename_kwds', String(length=255), table=<job_external_output_metadata>), Column('filename_override_metadata', String(length=255), table=<job_external_output_metadata>), Column('job_runner_external_pid', String(length=255), table=<job_external_output_metadata>), schema=None)
class galaxy.model.FakeDatasetAssociation(dataset=None)[source]

Bases: object

fake_dataset_association = True
__init__(dataset=None)[source]
class galaxy.model.JobExportHistoryArchive(compressed=False, **kwd)[source]

Bases: Base, RepresentById

id: int
job_id
history_id
dataset_id
history_attrs_filename
job
dataset
history
ATTRS_FILENAME_HISTORY = 'history_attrs.txt'
__init__(compressed=False, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

compressed
property fda
property temp_directory
property up_to_date

Return False, if a new export should be generated for corresponding history.

property ready
property preparing
property export_name
static create_for_history(history, job, sa_session, object_store, compressed)[source]
to_dict()[source]
table = Table('job_export_history_archive', MetaData(), Column('id', Integer(), table=<job_export_history_archive>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_export_history_archive>), Column('history_id', Integer(), ForeignKey('history.id'), table=<job_export_history_archive>), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<job_export_history_archive>), Column('compressed', Boolean(), table=<job_export_history_archive>, default=ColumnDefault(False)), Column('history_attrs_filename', TEXT(), table=<job_export_history_archive>), schema=None)
class galaxy.model.JobImportHistoryArchive(**kwargs)[source]

Bases: Base, RepresentById

id: int
job_id
history_id
archive_dir
job
history
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('job_import_history_archive', MetaData(), Column('id', Integer(), table=<job_import_history_archive>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_import_history_archive>), Column('history_id', Integer(), ForeignKey('history.id'), table=<job_import_history_archive>), Column('archive_dir', TEXT(), table=<job_import_history_archive>), schema=None)
class galaxy.model.StoreExportAssociation(**kwargs)[source]

Bases: Base, RepresentById

id: int
task_uuid
create_time
object_type
object_id
export_metadata
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('store_export_association', MetaData(), Column('id', Integer(), table=<store_export_association>, primary_key=True, nullable=False), Column('task_uuid', UUIDType(), table=<store_export_association>), Column('create_time', DateTime(), table=<store_export_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('object_type', TrimmedString(length=32), table=<store_export_association>), Column('object_id', Integer(), table=<store_export_association>), Column('export_metadata', JSONType(), table=<store_export_association>), schema=None)
class galaxy.model.JobContainerAssociation(**kwd)[source]

Bases: Base, RepresentById

id: int
job_id
container_type
container_name
created_time
modified_time
job
__init__(**kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

container_info
table = Table('job_container_association', MetaData(), Column('id', Integer(), table=<job_container_association>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<job_container_association>), Column('container_type', TEXT(), table=<job_container_association>), Column('container_name', TEXT(), table=<job_container_association>), Column('container_info', MutableJSONType(), table=<job_container_association>), Column('created_time', DateTime(), table=<job_container_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('modified_time', DateTime(), table=<job_container_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.InteractiveToolEntryPoint(requires_domain=True, configured=False, deleted=False, short_token=False, **kwd)[source]

Bases: Base, Dictifiable, RepresentById

id: int
job_id
name
tool_port
host
port
protocol
entry_url
created_time
modified_time
job
dict_collection_visible_keys = ['id', 'job_id', 'name', 'active', 'created_time', 'modified_time', 'output_datasets_ids']
dict_element_visible_keys = ['id', 'job_id', 'name', 'active', 'created_time', 'modified_time', 'output_datasets_ids']
__init__(requires_domain=True, configured=False, deleted=False, short_token=False, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

requires_domain
configured
deleted
token
info
property active
property output_datasets_ids
table = Table('interactivetool_entry_point', MetaData(), Column('id', Integer(), table=<interactivetool_entry_point>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<interactivetool_entry_point>), Column('name', TEXT(), table=<interactivetool_entry_point>), Column('token', TEXT(), table=<interactivetool_entry_point>), Column('tool_port', Integer(), table=<interactivetool_entry_point>), Column('host', TEXT(), table=<interactivetool_entry_point>), Column('port', Integer(), table=<interactivetool_entry_point>), Column('protocol', TEXT(), table=<interactivetool_entry_point>), Column('entry_url', TEXT(), table=<interactivetool_entry_point>), Column('requires_domain', Boolean(), table=<interactivetool_entry_point>, default=ColumnDefault(True)), Column('info', MutableJSONType(), table=<interactivetool_entry_point>), Column('configured', Boolean(), table=<interactivetool_entry_point>, default=ColumnDefault(False)), Column('deleted', Boolean(), table=<interactivetool_entry_point>, default=ColumnDefault(False)), Column('created_time', DateTime(), table=<interactivetool_entry_point>, default=ColumnDefault(<function datetime.utcnow>)), Column('modified_time', DateTime(), table=<interactivetool_entry_point>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.GenomeIndexToolData(**kwargs)[source]

Bases: Base, RepresentById

id: int
job_id
dataset_id
fasta_path
created_time
modified_time
indexer
user_id
job
dataset
user
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('genome_index_tool_data', MetaData(), Column('id', Integer(), table=<genome_index_tool_data>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<genome_index_tool_data>), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<genome_index_tool_data>), Column('fasta_path', String(length=255), table=<genome_index_tool_data>), Column('created_time', DateTime(), table=<genome_index_tool_data>, default=ColumnDefault(<function datetime.utcnow>)), Column('modified_time', DateTime(), table=<genome_index_tool_data>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('indexer', String(length=64), table=<genome_index_tool_data>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<genome_index_tool_data>), schema=None)
class galaxy.model.Group(name=None)[source]

Bases: Base, Dictifiable, RepresentById

id: int
create_time
update_time
quotas
roles
users
dict_collection_visible_keys = ['id', 'name']
dict_element_visible_keys = ['id', 'name']
__init__(name=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
deleted
table = Table('galaxy_group', MetaData(), Column('id', Integer(), table=<galaxy_group>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<galaxy_group>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<galaxy_group>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', String(length=255), table=<galaxy_group>), Column('deleted', Boolean(), table=<galaxy_group>, default=ColumnDefault(False)), schema=None)
class galaxy.model.UserGroupAssociation(user, group)[source]

Bases: Base, RepresentById

id: int
user_id
group_id
create_time
update_time
__init__(user, group)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

user
group
table = Table('user_group_association', MetaData(), Column('id', Integer(), table=<user_group_association>, primary_key=True, nullable=False), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<user_group_association>), Column('group_id', Integer(), ForeignKey('galaxy_group.id'), table=<user_group_association>), Column('create_time', DateTime(), table=<user_group_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<user_group_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
galaxy.model.is_hda(d)[source]
class galaxy.model.HistoryAudit(*args, **kwargs)[source]

Bases: Base, RepresentById

history_id
update_time
__init__(*args, **kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

classmethod prune(sa_session)[source]
table = Table('history_audit', MetaData(), Column('history_id', Integer(), ForeignKey('history.id'), table=<history_audit>, primary_key=True, nullable=False), Column('update_time', DateTime(), table=<history_audit>, primary_key=True, nullable=False, default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.History(id=None, name=None, user=None)[source]

Bases: Base, HasTags, Dictifiable, UsesAnnotations, HasName, Serializable

create_time
user_id
hid_counter
genome_build
importable
slug
datasets
exports
active_datasets
dataset_collections
active_dataset_collections
visible_datasets
visible_dataset_collections
tags: List[ItemTagAssociation]
annotations
ratings
default_permissions
users_shared_with
galaxy_sessions
workflow_invocations
jobs
update_time
users_shared_with_count: column_property
average_rating: column_property
users_shared_with_dot_users = ObjectAssociationProxyInstance(AssociationProxy('users_shared_with', 'user'))
dict_collection_visible_keys = ['id', 'name', 'published', 'deleted']
dict_element_visible_keys = ['id', 'name', 'genome_build', 'deleted', 'purged', 'update_time', 'published', 'importable', 'slug', 'empty']
default_name = 'Unnamed history'
__init__(id=None, name=None, user=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id: int
name
deleted
purged
importing
published
user
init_on_load()[source]
stage_addition(items)[source]
property empty
property count
add_pending_items(set_output_hid=True)[source]
add_galaxy_session(galaxy_session, association=None)[source]
add_dataset(dataset, parent_id=None, genome_build=None, set_hid=True, quota=True)[source]
add_datasets(sa_session, datasets, parent_id=None, genome_build=None, set_hid=True, quota=True, flush=False)[source]

Optimized version of add_dataset above that minimizes database interactions when adding many datasets and collections to history at once.

add_dataset_collection(history_dataset_collection, set_hid=True)[source]
copy(name=None, target_user=None, activatable=False, all_datasets=False)[source]

Return a copy of this history using the given name and target_user. If activatable, copy only non-deleted datasets. If all_datasets, copy non-deleted, deleted, and purged datasets.

get_dataset_by_hid(hid)[source]
property has_possible_members
property activatable_datasets
to_dict(view='collection', value_mapper=None)[source]

Return item dictionary.

property latest_export
unhide_datasets()[source]
resume_paused_jobs()[source]
property paused_jobs
disk_size

Return a query scalar that will get any history’s size in bytes by summing the ‘total_size’s of all non-purged, unique datasets within it.

property disk_nice_size

Returns human readable size of history on disk.

property active_dataset_and_roles_query
property active_datasets_and_roles
property active_visible_datasets_and_roles
property active_visible_dataset_collections
property active_contents

Return all active contents ordered by hid.

contents_iter(**kwds)[source]

Fetch filtered list of contents of history.

table = Table('history', MetaData(), Column('id', Integer(), table=<history>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<history>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<history>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<history>), Column('name', TrimmedString(length=255), table=<history>), Column('hid_counter', Integer(), table=<history>, default=ColumnDefault(1)), Column('deleted', Boolean(), table=<history>, default=ColumnDefault(False)), Column('purged', Boolean(), table=<history>, default=ColumnDefault(False)), Column('importing', Boolean(), table=<history>, default=ColumnDefault(False)), Column('genome_build', TrimmedString(length=40), table=<history>), Column('importable', Boolean(), table=<history>, default=ColumnDefault(False)), Column('slug', TEXT(), table=<history>), Column('published', Boolean(), table=<history>, default=ColumnDefault(False)), schema=None)
class galaxy.model.UserShareAssociation[source]

Bases: RepresentById

user: Optional[User]
class galaxy.model.HistoryUserShareAssociation(**kwargs)[source]

Bases: Base, UserShareAssociation

id: int
history_id
user_id
user: Optional[User]
history
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('history_user_share_association', MetaData(), Column('id', Integer(), table=<history_user_share_association>, primary_key=True, nullable=False), Column('history_id', Integer(), ForeignKey('history.id'), table=<history_user_share_association>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<history_user_share_association>), schema=None)
class galaxy.model.UserRoleAssociation(user, role)[source]

Bases: Base, RepresentById

id: int
user_id
role_id
create_time
update_time
__init__(user, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

user
role
table = Table('user_role_association', MetaData(), Column('id', Integer(), table=<user_role_association>, primary_key=True, nullable=False), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<user_role_association>), Column('role_id', Integer(), ForeignKey('role.id'), table=<user_role_association>), Column('create_time', DateTime(), table=<user_role_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<user_role_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.GroupRoleAssociation(group, role)[source]

Bases: Base, RepresentById

id: int
group_id
role_id
create_time
update_time
__init__(group, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

group
role
table = Table('group_role_association', MetaData(), Column('id', Integer(), table=<group_role_association>, primary_key=True, nullable=False), Column('group_id', Integer(), ForeignKey('galaxy_group.id'), table=<group_role_association>), Column('role_id', Integer(), ForeignKey('role.id'), table=<group_role_association>), Column('create_time', DateTime(), table=<group_role_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<group_role_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.Role(name=None, description=None, type=types.SYSTEM, deleted=False)[source]

Bases: Base, Dictifiable, RepresentById

id: int
create_time
update_time
dataset_actions
groups
users
dict_collection_visible_keys = ['id', 'name']
dict_element_visible_keys = ['id', 'name', 'description', 'type']
private_id = None
class types(value)[source]

Bases: str, Enum

An enumeration.

PRIVATE = 'private'
SYSTEM = 'system'
USER = 'user'
ADMIN = 'admin'
SHARING = 'sharing'
__init__(name=None, description=None, type=types.SYSTEM, deleted=False)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
description
type
deleted
table = Table('role', MetaData(), Column('id', Integer(), table=<role>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<role>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<role>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', String(length=255), table=<role>), Column('description', TEXT(), table=<role>), Column('type', String(length=40), table=<role>), Column('deleted', Boolean(), table=<role>, default=ColumnDefault(False)), schema=None)
class galaxy.model.UserQuotaAssociation(user, quota)[source]

Bases: Base, Dictifiable, RepresentById

id: int
user_id
quota_id
create_time
update_time
dict_element_visible_keys = ['user']
__init__(user, quota)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

user
quota
table = Table('user_quota_association', MetaData(), Column('id', Integer(), table=<user_quota_association>, primary_key=True, nullable=False), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<user_quota_association>), Column('quota_id', Integer(), ForeignKey('quota.id'), table=<user_quota_association>), Column('create_time', DateTime(), table=<user_quota_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<user_quota_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.GroupQuotaAssociation(group, quota)[source]

Bases: Base, Dictifiable, RepresentById

id: int
group_id
quota_id
create_time
update_time
dict_element_visible_keys = ['group']
__init__(group, quota)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

group
quota
table = Table('group_quota_association', MetaData(), Column('id', Integer(), table=<group_quota_association>, primary_key=True, nullable=False), Column('group_id', Integer(), ForeignKey('galaxy_group.id'), table=<group_quota_association>), Column('quota_id', Integer(), ForeignKey('quota.id'), table=<group_quota_association>), Column('create_time', DateTime(), table=<group_quota_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<group_quota_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.Quota(name=None, description=None, amount=0, operation='=')[source]

Bases: Base, Dictifiable, RepresentById

id: int
create_time
update_time
deleted
default
groups
users
dict_collection_visible_keys = ['id', 'name']
dict_element_visible_keys = ['id', 'name', 'description', 'bytes', 'operation', 'display_amount', 'default', 'users', 'groups']
valid_operations = ('+', '-', '=')
__init__(name=None, description=None, amount=0, operation='=')

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
description
bytes
operation
get_amount()[source]
set_amount(amount)[source]
property amount
property display_amount
table = Table('quota', MetaData(), Column('id', Integer(), table=<quota>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<quota>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<quota>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', String(length=255), table=<quota>), Column('description', TEXT(), table=<quota>), Column('bytes', BigInteger(), table=<quota>), Column('operation', String(length=8), table=<quota>), Column('deleted', Boolean(), table=<quota>, default=ColumnDefault(False)), schema=None)
class galaxy.model.DefaultQuotaAssociation(type, quota)[source]

Bases: Base, Dictifiable, RepresentById

id: int
create_time
update_time
quota_id
dict_element_visible_keys = ['type']
class types(value)[source]

Bases: str, Enum

An enumeration.

UNREGISTERED = 'unregistered'
REGISTERED = 'registered'
__init__(type, quota)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

type
quota
table = Table('default_quota_association', MetaData(), Column('id', Integer(), table=<default_quota_association>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<default_quota_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<default_quota_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('type', String(length=32), table=<default_quota_association>), Column('quota_id', Integer(), ForeignKey('quota.id'), table=<default_quota_association>), schema=None)
class galaxy.model.DatasetPermissions(action, dataset, role=None, role_id=None)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
dataset_id
__init__(action, dataset, role=None, role_id=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action
dataset
role
role_id
table = Table('dataset_permissions', MetaData(), Column('id', Integer(), table=<dataset_permissions>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<dataset_permissions>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<dataset_permissions>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('action', TEXT(), table=<dataset_permissions>), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<dataset_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<dataset_permissions>), schema=None)
class galaxy.model.LibraryPermissions(action, library_item, role)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
library_id
role_id
__init__(action, library_item, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action
library
role
table = Table('library_permissions', MetaData(), Column('id', Integer(), table=<library_permissions>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<library_permissions>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_permissions>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('action', TEXT(), table=<library_permissions>), Column('library_id', Integer(), ForeignKey('library.id'), table=<library_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<library_permissions>), schema=None)
class galaxy.model.LibraryFolderPermissions(action, library_item, role)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
library_folder_id
role_id
__init__(action, library_item, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action
folder
role
table = Table('library_folder_permissions', MetaData(), Column('id', Integer(), table=<library_folder_permissions>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<library_folder_permissions>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_folder_permissions>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('action', TEXT(), table=<library_folder_permissions>), Column('library_folder_id', Integer(), ForeignKey('library_folder.id'), table=<library_folder_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<library_folder_permissions>), schema=None)
class galaxy.model.LibraryDatasetPermissions(action, library_item, role)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
library_dataset_id
role_id
__init__(action, library_item, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action
library_dataset
role
table = Table('library_dataset_permissions', MetaData(), Column('id', Integer(), table=<library_dataset_permissions>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<library_dataset_permissions>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_dataset_permissions>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('action', TEXT(), table=<library_dataset_permissions>), Column('library_dataset_id', Integer(), ForeignKey('library_dataset.id'), table=<library_dataset_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<library_dataset_permissions>), schema=None)
class galaxy.model.LibraryDatasetDatasetAssociationPermissions(action, library_item, role)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
library_dataset_dataset_association_id
role_id
__init__(action, library_item, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

action
library_dataset_dataset_association
role
table = Table('library_dataset_dataset_association_permissions', MetaData(), Column('id', Integer(), table=<library_dataset_dataset_association_permissions>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<library_dataset_dataset_association_permissions>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_dataset_dataset_association_permissions>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('action', TEXT(), table=<library_dataset_dataset_association_permissions>), Column('library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<library_dataset_dataset_association_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<library_dataset_dataset_association_permissions>), schema=None)
class galaxy.model.DefaultUserPermissions(user, action, role)[source]

Bases: Base, RepresentById

id: int
user_id
role_id
__init__(user, action, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

user
action
role
table = Table('default_user_permissions', MetaData(), Column('id', Integer(), table=<default_user_permissions>, primary_key=True, nullable=False), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<default_user_permissions>), Column('action', TEXT(), table=<default_user_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<default_user_permissions>), schema=None)
class galaxy.model.DefaultHistoryPermissions(history, action, role)[source]

Bases: Base, RepresentById

id: int
history_id
role_id
__init__(history, action, role)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

history
action
role
table = Table('default_history_permissions', MetaData(), Column('id', Integer(), table=<default_history_permissions>, primary_key=True, nullable=False), Column('history_id', Integer(), ForeignKey('history.id'), table=<default_history_permissions>), Column('action', TEXT(), table=<default_history_permissions>), Column('role_id', Integer(), ForeignKey('role.id'), table=<default_history_permissions>), schema=None)
class galaxy.model.StorableObject[source]

Bases: object

flush()[source]
class galaxy.model.Dataset(id=None, state=None, external_filename=None, extra_files_path=None, file_size=None, purgable=True, uuid=None)[source]

Bases: Base, StorableObject, Serializable

job_id
create_time
update_time
object_store_id
created_from_basename
total_size
actions
job
active_history_associations
purged_history_associations
active_library_associations
history_associations
library_associations
class states(value)[source]

Bases: str, Enum

An enumeration.

NEW = 'new'
UPLOAD = 'upload'
QUEUED = 'queued'
RUNNING = 'running'
OK = 'ok'
EMPTY = 'empty'
ERROR = 'error'
PAUSED = 'paused'
SETTING_METADATA = 'setting_metadata'
FAILED_METADATA = 'failed_metadata'
DEFERRED = 'deferred'
DISCARDED = 'discarded'
classmethod values()[source]
non_ready_states = (<states.NEW: 'new'>, <states.UPLOAD: 'upload'>, <states.QUEUED: 'queued'>, <states.RUNNING: 'running'>, <states.SETTING_METADATA: 'setting_metadata'>)
ready_states = (<states.PAUSED: 'paused'>, <states.DEFERRED: 'deferred'>, <states.OK: 'ok'>, <states.ERROR: 'error'>, <states.DISCARDED: 'discarded'>, <states.FAILED_METADATA: 'failed_metadata'>, <states.EMPTY: 'empty'>)
valid_input_states = (<states.UPLOAD: 'upload'>, <states.PAUSED: 'paused'>, <states.DEFERRED: 'deferred'>, <states.RUNNING: 'running'>, <states.SETTING_METADATA: 'setting_metadata'>, <states.OK: 'ok'>, <states.QUEUED: 'queued'>, <states.FAILED_METADATA: 'failed_metadata'>, <states.EMPTY: 'empty'>, <states.NEW: 'new'>)
terminal_states = (<states.OK: 'ok'>, <states.EMPTY: 'empty'>, <states.ERROR: 'error'>, <states.DEFERRED: 'deferred'>, <states.DISCARDED: 'discarded'>, <states.FAILED_METADATA: 'failed_metadata'>)
class conversion_messages(value)[source]

Bases: str, Enum

An enumeration.

PENDING = 'pending'
NO_DATA = 'no data'
NO_CHROMOSOME = 'no chromosome'
NO_CONVERTER = 'no converter'
NO_TOOL = 'no tool'
DATA = 'data'
ERROR = 'error'
OK = 'ok'
permitted_actions = <galaxy.util.bunch.Bunch object>
file_path = '/tmp/'
object_store: Optional[ObjectStore] = None
engine = None
__init__(id=None, state=None, external_filename=None, extra_files_path=None, file_size=None, purgable=True, uuid=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id: int
uuid
state
deleted
purged
purgable
external_filename
file_size
sources
hashes
property is_new
in_ready_state()[source]
get_file_name()[source]
set_file_name(filename)[source]
property file_name
get_extra_files_path()[source]
create_extra_files_path()[source]
set_extra_files_path(extra_files_path)[source]
property extra_files_path
extra_files_path_exists()[source]
property store_by
extra_files_path_name_from(object_store)[source]
property extra_files_path_name
get_size(nice_size=False, calculate_size=True)[source]

Returns the size of the data on disk

set_size(no_extra_files=False)[source]

Sets the size of the data on disk.

If the caller is sure there are no extra files, pass no_extra_files as True to optimize subsequent calls to get_total_size or set_total_size - potentially avoiding both a database flush and check against the file system.

get_total_size()[source]
set_total_size()[source]
has_data()[source]

Detects whether there is any data

mark_deleted()[source]
property user_can_purge
full_delete()[source]

Remove the file and extra files, marks deleted and purged

get_access_roles(security_agent)[source]
get_manage_permissions_roles(security_agent)[source]
has_manage_permissions_roles(security_agent)[source]
table = Table('dataset', MetaData(), Column('id', Integer(), table=<dataset>, primary_key=True, nullable=False), Column('job_id', Integer(), ForeignKey('job.id'), table=<dataset>), Column('create_time', DateTime(), table=<dataset>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<dataset>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('state', TrimmedString(length=64), table=<dataset>), Column('deleted', Boolean(), table=<dataset>, default=ColumnDefault(False)), Column('purged', Boolean(), table=<dataset>, default=ColumnDefault(False)), Column('purgable', Boolean(), table=<dataset>, default=ColumnDefault(True)), Column('object_store_id', TrimmedString(length=255), table=<dataset>), Column('external_filename', TEXT(), table=<dataset>), Column('_extra_files_path', TEXT(), table=<dataset>), Column('created_from_basename', TEXT(), table=<dataset>), Column('file_size', Numeric(precision=15, scale=0), table=<dataset>), Column('total_size', Numeric(precision=15, scale=0), table=<dataset>), Column('uuid', UUIDType(), table=<dataset>), schema=None)
class galaxy.model.DatasetSource(**kwargs)[source]

Bases: Base, Dictifiable, Serializable

id: int
dataset_id
source_uri
extra_files_path
transform
dataset
hashes
dict_collection_visible_keys = ['id', 'source_uri', 'extra_files_path', 'transform']
dict_element_visible_keys = ['id', 'source_uri', 'extra_files_path', 'transform']
copy() DatasetSource[source]
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('dataset_source', MetaData(), Column('id', Integer(), table=<dataset_source>, primary_key=True, nullable=False), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<dataset_source>), Column('source_uri', TEXT(), table=<dataset_source>), Column('extra_files_path', TEXT(), table=<dataset_source>), Column('transform', MutableJSONType(), table=<dataset_source>), schema=None)
class galaxy.model.DatasetSourceHash(**kwargs)[source]

Bases: Base, Serializable

id: int
dataset_source_id
hash_function
hash_value
source
copy() DatasetSourceHash[source]
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('dataset_source_hash', MetaData(), Column('id', Integer(), table=<dataset_source_hash>, primary_key=True, nullable=False), Column('dataset_source_id', Integer(), ForeignKey('dataset_source.id'), table=<dataset_source_hash>), Column('hash_function', TEXT(), table=<dataset_source_hash>), Column('hash_value', TEXT(), table=<dataset_source_hash>), schema=None)
class galaxy.model.DatasetHash(**kwargs)[source]

Bases: Base, Dictifiable, Serializable

id: int
dataset_id
hash_function
hash_value
extra_files_path
dataset
dict_collection_visible_keys = ['id', 'hash_function', 'hash_value', 'extra_files_path']
dict_element_visible_keys = ['id', 'hash_function', 'hash_value', 'extra_files_path']
copy() DatasetHash[source]
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('dataset_hash', MetaData(), Column('id', Integer(), table=<dataset_hash>, primary_key=True, nullable=False), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<dataset_hash>), Column('hash_function', TEXT(), table=<dataset_hash>), Column('hash_value', TEXT(), table=<dataset_hash>), Column('extra_files_path', TEXT(), table=<dataset_hash>), schema=None)
galaxy.model.datatype_for_extension(extension, datatypes_registry=None) Data[source]
class galaxy.model.DatasetInstance(id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None, dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None, parent_id=None, validated_state='unknown', validated_state_message=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None, flush=True, metadata_deferred=False, creating_job_id=None)[source]

Bases: UsesCreateAndUpdateTime, object

A base class for all ‘dataset instances’, HDAs, LDAs, etc

class states(value)

Bases: str, Enum

An enumeration.

NEW = 'new'
UPLOAD = 'upload'
QUEUED = 'queued'
RUNNING = 'running'
OK = 'ok'
EMPTY = 'empty'
ERROR = 'error'
PAUSED = 'paused'
SETTING_METADATA = 'setting_metadata'
FAILED_METADATA = 'failed_metadata'
DEFERRED = 'deferred'
DISCARDED = 'discarded'
classmethod values()
class conversion_messages(value)

Bases: str, Enum

An enumeration.

PENDING = 'pending'
NO_DATA = 'no data'
NO_CHROMOSOME = 'no chromosome'
NO_CONVERTER = 'no converter'
NO_TOOL = 'no tool'
DATA = 'data'
ERROR = 'error'
OK = 'ok'
permitted_actions = <galaxy.util.bunch.Bunch object>
purged: bool
creating_job_associations: List[Union[JobToOutputDatasetCollectionAssociation, JobToOutputDatasetAssociation]]
class validated_states(value)[source]

Bases: str, Enum

An enumeration.

UNKNOWN = 'unknown'
INVALID = 'invalid'
OK = 'ok'
__init__(id=None, hid=None, name=None, info=None, blurb=None, peek=None, tool_version=None, extension=None, dbkey=None, metadata=None, history=None, dataset=None, deleted=False, designation=None, parent_id=None, validated_state='unknown', validated_state_message=None, visible=True, create_dataset=False, sa_session=None, extended_metadata=None, flush=True, metadata_deferred=False, creating_job_id=None)[source]
property peek
property ext
property has_deferred_data
get_dataset_state()[source]
raw_set_dataset_state(state)[source]
set_dataset_state(state)[source]
property state
get_file_name() str[source]
set_file_name(filename: str)[source]
property file_name: str
property extra_files_path
extra_files_path_exists()[source]
property datatype: Data
get_metadata()[source]
property set_metadata_requires_flush
set_metadata(bunch)[source]
property metadata
property has_metadata_files
property metadata_file_types
get_metadata_file_paths_and_extensions() List[Tuple[str, str]][source]
get_dbkey()[source]
set_dbkey(value)[source]
property dbkey
ok_to_edit_metadata()[source]
change_datatype(new_ext)[source]
get_size(nice_size=False, calculate_size=True)[source]

Returns the size of the data on disk

set_size(**kwds)[source]

Sets and gets the size of the data on disk

get_total_size()[source]
set_total_size()[source]
has_data()[source]

Detects whether there is any data

get_created_from_basename()[source]
set_created_from_basename(created_from_basename)[source]
property created_from_basename
property sources
property hashes
get_mime()[source]

Returns the mime type of the data

set_peek(**kwd)[source]
init_meta(copy_from=None)[source]
set_meta(**kwd)[source]
missing_meta(**kwd)[source]
as_display_type(type, **kwd)[source]
display_peek()[source]
display_name()[source]
display_info()[source]
get_converted_files_by_type(file_type)[source]
get_converted_dataset_deps(trans, target_ext)[source]

Returns dict of { “dependency” => HDA }

get_converted_dataset(trans, target_ext, target_context=None, history=None)[source]

Return converted dataset(s) if they exist, along with a dict of dependencies. If not converted yet, do so and return None (the first time). If unconvertible, raise exception.

copy_attributes(new_dataset)[source]

Copies attributes to a new datasets, used for implicit conversions

get_metadata_dataset(dataset_ext)[source]

Returns an HDA that points to a metadata file which contains a converted data with the requested extension.

clear_associated_files(metadata_safe=False, purge=False)[source]
get_converter_types()[source]
can_convert_to(format)[source]
find_conversion_destination(accepted_formats: List[str], **kwd) Tuple[bool, Optional[str], Optional[DatasetInstance]][source]

Returns ( target_ext, existing converted dataset )

add_validation_error(validation_error)[source]
extend_validation_errors(validation_errors)[source]
mark_deleted()[source]
mark_undeleted()[source]
mark_unhidden()[source]
undeletable()[source]
property is_ok
property is_pending

Return true if the dataset is neither ready nor in error

property source_library_dataset
property source_dataset_chain
property creating_job
get_display_applications(trans)[source]
get_datasources(trans)[source]

Returns datasources for dataset; if datasources are not available due to indexing, indexing is started. Return value is a dictionary with entries of type (<datasource_type> : {<datasource_name>, <indexing_message>}).

convert_dataset(trans, target_type)[source]

Converts a dataset to the target_type and returns a message indicating status of the conversion. None is returned to indicate that dataset was converted successfully.

class galaxy.model.HistoryDatasetAssociation(hid=None, history=None, copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, sa_session=None, **kwd)[source]

Bases: DatasetInstance, HasTags, Dictifiable, UsesAnnotations, HasName, Serializable

Resource class that creates a relation between a dataset and a user history.

__init__(hid=None, history=None, copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, sa_session=None, **kwd)

Create a a new HDA and associate it with the given history.

hid
history
copied_from_history_dataset_association
copied_from_library_dataset_dataset_association
property user
copy_from(other_hda, new_dataset=None, include_tags=True, include_metadata=False)[source]
copy(parent_id=None, copy_tags=None, flush=True, copy_hid=True, new_name=None)[source]

Create a copy of this HDA.

copy_tags_to(copy_tags=None)[source]
copy_attributes(new_dataset)[source]

Copies attributes to a new datasets, used for implicit conversions

to_library_dataset_dataset_association(trans, target_folder, replace_dataset=None, parent_id=None, roles=None, ldda_message='', element_identifier=None)[source]

Copy this HDA to a library optionally replacing an existing LDDA.

clear_associated_files(metadata_safe=False, purge=False)[source]
get_access_roles(security_agent)[source]

Return The access roles associated with this HDA’s dataset.

purge_usage_from_quota(user)[source]

Remove this HDA’s quota_amount from user’s quota.

quota_amount(user)[source]

Return the disk space used for this HDA relevant to user quotas.

If the user has multiple instances of this dataset, it will not affect their disk usage statistic.

to_dict(view='collection', expose_dataset_path=False)[source]

Return attributes of this HDA that are exposed using the API.

unpause_dependent_jobs(jobs=None)[source]
property history_content_type
content_type = 'dataset'
type_id
annotations
blurb
copied_from_history_dataset_association_id
copied_from_library_dataset_dataset_association_id
copied_to_history_dataset_associations
copied_to_library_dataset_dataset_associations
create_time
creating_job_associations: List[Union[JobToOutputDatasetCollectionAssociation, JobToOutputDatasetAssociation]]
dataset
dataset_id
deleted
dependent_jobs
designation
extended_metadata
extended_metadata_id
extension
hidden_beneath_collection_instance
hidden_beneath_collection_instance_id
history_id
id: int
implicitly_converted_datasets
implicitly_converted_parent_datasets
info
metadata_deferred
name
parent_id
purged: bool
ratings
table = Table('history_dataset_association', MetaData(), Column('id', Integer(), table=<history_dataset_association>, primary_key=True, nullable=False), Column('history_id', Integer(), ForeignKey('history.id'), table=<history_dataset_association>), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<history_dataset_association>), Column('create_time', DateTime(), table=<history_dataset_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<history_dataset_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('state', TrimmedString(length=64), table=<history_dataset_association>, key='_state'), Column('copied_from_history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association>), Column('copied_from_library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<history_dataset_association>), Column('name', TrimmedString(length=255), table=<history_dataset_association>), Column('info', TrimmedString(length=255), table=<history_dataset_association>), Column('blurb', TrimmedString(length=255), table=<history_dataset_association>), Column('peek', TEXT(), table=<history_dataset_association>, key='_peek'), Column('tool_version', TEXT(), table=<history_dataset_association>), Column('extension', TrimmedString(length=64), table=<history_dataset_association>), Column('metadata', MetadataType(), table=<history_dataset_association>, key='_metadata'), Column('metadata_deferred', Boolean(), table=<history_dataset_association>), Column('parent_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association>), Column('designation', TrimmedString(length=255), table=<history_dataset_association>), Column('deleted', Boolean(), table=<history_dataset_association>, default=ColumnDefault(False)), Column('visible', Boolean(), table=<history_dataset_association>), Column('extended_metadata_id', Integer(), ForeignKey('extended_metadata.id'), table=<history_dataset_association>), Column('version', Integer(), table=<history_dataset_association>, default=ColumnDefault(1)), Column('hid', Integer(), table=<history_dataset_association>), Column('purged', Boolean(), table=<history_dataset_association>, default=ColumnDefault(False)), Column('validated_state', TrimmedString(length=64), table=<history_dataset_association>, nullable=False, default=ColumnDefault('unvalidated')), Column('validated_state_message', TEXT(), table=<history_dataset_association>), Column('hidden_beneath_collection_instance_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<history_dataset_association>), schema=None)
tags: List[ItemTagAssociation]
tool_version
update_time: DateTime
validated_state
validated_state_message
version
visible
class galaxy.model.HistoryDatasetAssociationHistory(history_dataset_association_id, name, dbkey, update_time, version, extension, extended_metadata_id, metadata)[source]

Bases: Base, Serializable

id: int
__init__(history_dataset_association_id, name, dbkey, update_time, version, extension, extended_metadata_id, metadata)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

history_dataset_association_id
name
update_time
version
extension
extended_metadata_id
table = Table('history_dataset_association_history', MetaData(), Column('id', Integer(), table=<history_dataset_association_history>, primary_key=True, nullable=False), Column('history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association_history>), Column('update_time', DateTime(), table=<history_dataset_association_history>, default=ColumnDefault(<function datetime.utcnow>)), Column('version', Integer(), table=<history_dataset_association_history>), Column('name', TrimmedString(length=255), table=<history_dataset_association_history>), Column('extension', TrimmedString(length=64), table=<history_dataset_association_history>), Column('metadata', MetadataType(), table=<history_dataset_association_history>), Column('extended_metadata_id', Integer(), ForeignKey('extended_metadata.id'), table=<history_dataset_association_history>), schema=None)
class galaxy.model.HistoryDatasetAssociationDisplayAtAuthorization(hda=None, user=None, site=None)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
history_dataset_association_id
user_id
__init__(hda=None, user=None, site=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

history_dataset_association
user
site
table = Table('history_dataset_association_display_at_authorization', MetaData(), Column('id', Integer(), table=<history_dataset_association_display_at_authorization>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<history_dataset_association_display_at_authorization>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<history_dataset_association_display_at_authorization>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association_display_at_authorization>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<history_dataset_association_display_at_authorization>), Column('site', TrimmedString(length=255), table=<history_dataset_association_display_at_authorization>), schema=None)
class galaxy.model.HistoryDatasetAssociationSubset(hda, subset, location)[source]

Bases: Base, RepresentById

id: int
history_dataset_association_id
history_dataset_association_subset_id
__init__(hda, subset, location)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

hda
subset
location
table = Table('history_dataset_association_subset', MetaData(), Column('id', Integer(), table=<history_dataset_association_subset>, primary_key=True, nullable=False), Column('history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association_subset>), Column('history_dataset_association_subset_id', Integer(), ForeignKey('history_dataset_association.id'), table=<history_dataset_association_subset>), Column('location', Unicode(length=255), table=<history_dataset_association_subset>), schema=None)
class galaxy.model.Library(name=None, description=None, synopsis=None, root_folder=None)[source]

Bases: Base, Dictifiable, HasName, Serializable

id: int
root_folder_id
create_time
update_time
deleted
purged
actions
permitted_actions = <galaxy.util.bunch.Bunch object>
dict_collection_visible_keys = ['id', 'name']
dict_element_visible_keys = ['id', 'deleted', 'name', 'description', 'synopsis', 'root_folder_id', 'create_time']
__init__(name=None, description=None, synopsis=None, root_folder=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
description
synopsis
root_folder
to_dict(view='collection', value_mapper=None)[source]

We prepend an F to folders.

get_active_folders(folder, folders=None)[source]
get_access_roles(security_agent)[source]
table = Table('library', MetaData(), Column('id', Integer(), table=<library>, primary_key=True, nullable=False), Column('root_folder_id', Integer(), ForeignKey('library_folder.id'), table=<library>), Column('create_time', DateTime(), table=<library>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', String(length=255), table=<library>), Column('deleted', Boolean(), table=<library>, default=ColumnDefault(False)), Column('purged', Boolean(), table=<library>, default=ColumnDefault(False)), Column('description', TEXT(), table=<library>), Column('synopsis', TEXT(), table=<library>), schema=None)
class galaxy.model.LibraryFolder(name=None, description=None, item_count=0, order_id=None, genome_build=None)[source]

Bases: Base, Dictifiable, HasName, Serializable

id: int
parent_id
create_time
update_time
deleted
purged
folders
parent
active_folders
datasets
active_datasets
library_root
actions
dict_element_visible_keys = ['id', 'parent_id', 'name', 'description', 'item_count', 'genome_build', 'update_time', 'deleted']
__init__(name=None, description=None, item_count=0, order_id=None, genome_build=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

name
description
item_count
order_id
genome_build
add_library_dataset(library_dataset, genome_build=None)[source]
add_folder(folder)[source]
property activatable_library_datasets
to_dict(view='collection', value_mapper=None)[source]

Return item dictionary.

property library_path
property parent_library
table = Table('library_folder', MetaData(), Column('id', Integer(), table=<library_folder>, primary_key=True, nullable=False), Column('parent_id', Integer(), ForeignKey('library_folder.id'), table=<library_folder>), Column('create_time', DateTime(), table=<library_folder>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_folder>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', TEXT(), table=<library_folder>), Column('description', TEXT(), table=<library_folder>), Column('order_id', Integer(), table=<library_folder>), Column('item_count', Integer(), table=<library_folder>), Column('deleted', Boolean(), table=<library_folder>, default=ColumnDefault(False)), Column('purged', Boolean(), table=<library_folder>, default=ColumnDefault(False)), Column('genome_build', TrimmedString(length=40), table=<library_folder>), schema=None)
class galaxy.model.LibraryDataset(**kwargs)[source]

Bases: Base, Serializable

id: int
library_dataset_dataset_association_id
folder_id
order_id
create_time
update_time
deleted
purged
folder
library_dataset_dataset_association
expired_datasets
actions
upload_options = [('upload_file', 'Upload files'), ('upload_directory', 'Upload directory of files'), ('upload_paths', 'Upload files from filesystem paths'), ('import_from_history', 'Import datasets from your current history')]
get_info()[source]
set_info(info)[source]
property info
get_name()[source]
set_name(name)[source]
property name
display_name()[source]
to_dict(view='collection')[source]
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('library_dataset', MetaData(), Column('id', Integer(), table=<library_dataset>, primary_key=True, nullable=False), Column('library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<library_dataset>), Column('folder_id', Integer(), ForeignKey('library_folder.id'), table=<library_dataset>), Column('order_id', Integer(), table=<library_dataset>), Column('create_time', DateTime(), table=<library_dataset>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_dataset>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('name', TrimmedString(length=255), table=<library_dataset>), Column('info', TrimmedString(length=255), table=<library_dataset>), Column('deleted', Boolean(), table=<library_dataset>, default=ColumnDefault(False)), Column('purged', Boolean(), table=<library_dataset>, default=ColumnDefault(False)), schema=None)
class galaxy.model.LibraryDatasetDatasetAssociation(copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, library_dataset=None, user=None, sa_session=None, **kwd)[source]

Bases: DatasetInstance, HasName, Serializable

__init__(copied_from_history_dataset_association=None, copied_from_library_dataset_dataset_association=None, library_dataset=None, user=None, sa_session=None, **kwd)
copied_from_history_dataset_association_id
copied_from_library_dataset_dataset_association_id
library_dataset
user
to_history_dataset_association(target_history, parent_id=None, add_to_history=False, visible=None)[source]
copy(parent_id=None, target_folder=None)[source]
clear_associated_files(metadata_safe=False, purge=False)[source]
get_access_roles(security_agent)[source]
get_manage_permissions_roles(security_agent)[source]
has_manage_permissions_roles(security_agent)[source]
to_dict(view='collection')[source]
update_parent_folder_update_times()[source]
actions
blurb
copied_from_history_dataset_association
copied_from_library_dataset_dataset_association
copied_to_history_dataset_associations
copied_to_library_dataset_dataset_associations
create_time
creating_job_associations: List[Union[JobToOutputDatasetCollectionAssociation, JobToOutputDatasetAssociation]]
dataset
dataset_id
deleted
dependent_jobs
designation
extended_metadata
extended_metadata_id
extension
id: int
implicitly_converted_datasets
implicitly_converted_parent_datasets
info
library_dataset_id
message
metadata_deferred
name
parent_id
table = Table('library_dataset_dataset_association', MetaData(), Column('id', Integer(), table=<library_dataset_dataset_association>, primary_key=True, nullable=False), Column('library_dataset_id', Integer(), ForeignKey('library_dataset.id'), table=<library_dataset_dataset_association>), Column('dataset_id', Integer(), ForeignKey('dataset.id'), table=<library_dataset_dataset_association>), Column('create_time', DateTime(), table=<library_dataset_dataset_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<library_dataset_dataset_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('state', TrimmedString(length=64), table=<library_dataset_dataset_association>, key='_state'), Column('copied_from_history_dataset_association_id', Integer(), ForeignKey('history_dataset_association.id'), table=<library_dataset_dataset_association>), Column('copied_from_library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<library_dataset_dataset_association>), Column('name', TrimmedString(length=255), table=<library_dataset_dataset_association>), Column('info', TrimmedString(length=255), table=<library_dataset_dataset_association>), Column('blurb', TrimmedString(length=255), table=<library_dataset_dataset_association>), Column('peek', TEXT(), table=<library_dataset_dataset_association>, key='_peek'), Column('tool_version', TEXT(), table=<library_dataset_dataset_association>), Column('extension', TrimmedString(length=64), table=<library_dataset_dataset_association>), Column('metadata', MetadataType(), table=<library_dataset_dataset_association>, key='_metadata'), Column('metadata_deferred', Boolean(), table=<library_dataset_dataset_association>), Column('parent_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<library_dataset_dataset_association>), Column('designation', TrimmedString(length=255), table=<library_dataset_dataset_association>), Column('deleted', Boolean(), table=<library_dataset_dataset_association>, default=ColumnDefault(False)), Column('validated_state', TrimmedString(length=64), table=<library_dataset_dataset_association>, nullable=False, default=ColumnDefault('unvalidated')), Column('validated_state_message', TEXT(), table=<library_dataset_dataset_association>), Column('visible', Boolean(), table=<library_dataset_dataset_association>), Column('extended_metadata_id', Integer(), ForeignKey('extended_metadata.id'), table=<library_dataset_dataset_association>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<library_dataset_dataset_association>), Column('message', TrimmedString(length=255), table=<library_dataset_dataset_association>), schema=None)
tags
tool_version
update_time: DateTime
user_id
validated_state
validated_state_message
visible
purged: bool
class galaxy.model.ExtendedMetadata(data)[source]

Bases: Base, RepresentById

id: int
children
__init__(data)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

data
table = Table('extended_metadata', MetaData(), Column('id', Integer(), table=<extended_metadata>, primary_key=True, nullable=False), Column('data', MutableJSONType(), table=<extended_metadata>), schema=None)
class galaxy.model.ExtendedMetadataIndex(extended_metadata, path, value)[source]

Bases: Base, RepresentById

id: int
extended_metadata_id
__init__(extended_metadata, path, value)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

extended_metadata
path
value
table = Table('extended_metadata_index', MetaData(), Column('id', Integer(), table=<extended_metadata_index>, primary_key=True, nullable=False), Column('extended_metadata_id', Integer(), ForeignKey('extended_metadata.id'), table=<extended_metadata_index>), Column('path', String(length=255), table=<extended_metadata_index>), Column('value', TEXT(), table=<extended_metadata_index>), schema=None)
class galaxy.model.LibraryInfoAssociation(library, form_definition, info, inheritable=False)[source]

Bases: Base, RepresentById

id: int
library_id
form_definition_id
form_values_id
deleted
__init__(library, form_definition, info, inheritable=False)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

library
template
info
inheritable
table = Table('library_info_association', MetaData(), Column('id', Integer(), table=<library_info_association>, primary_key=True, nullable=False), Column('library_id', Integer(), ForeignKey('library.id'), table=<library_info_association>), Column('form_definition_id', Integer(), ForeignKey('form_definition.id'), table=<library_info_association>), Column('form_values_id', Integer(), ForeignKey('form_values.id'), table=<library_info_association>), Column('inheritable', Boolean(), table=<library_info_association>, default=ColumnDefault(False)), Column('deleted', Boolean(), table=<library_info_association>, default=ColumnDefault(False)), schema=None)
class galaxy.model.LibraryFolderInfoAssociation(folder, form_definition, info, inheritable=False)[source]

Bases: Base, RepresentById

id: int
library_folder_id
form_definition_id
form_values_id
deleted
__init__(folder, form_definition, info, inheritable=False)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

folder
template
info
inheritable
table = Table('library_folder_info_association', MetaData(), Column('id', Integer(), table=<library_folder_info_association>, primary_key=True, nullable=False), Column('library_folder_id', Integer(), ForeignKey('library_folder.id'), table=<library_folder_info_association>), Column('form_definition_id', Integer(), ForeignKey('form_definition.id'), table=<library_folder_info_association>), Column('form_values_id', Integer(), ForeignKey('form_values.id'), table=<library_folder_info_association>), Column('inheritable', Boolean(), table=<library_folder_info_association>, default=ColumnDefault(False)), Column('deleted', Boolean(), table=<library_folder_info_association>, default=ColumnDefault(False)), schema=None)
class galaxy.model.LibraryDatasetDatasetInfoAssociation(library_dataset_dataset_association, form_definition, info)[source]

Bases: Base, RepresentById

id: int
library_dataset_dataset_association_id
form_definition_id
form_values_id
deleted
__init__(library_dataset_dataset_association, form_definition, info)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

library_dataset_dataset_association
template
info
property inheritable
table = Table('library_dataset_dataset_info_association', MetaData(), Column('id', Integer(), table=<library_dataset_dataset_info_association>, primary_key=True, nullable=False), Column('library_dataset_dataset_association_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<library_dataset_dataset_info_association>), Column('form_definition_id', Integer(), ForeignKey('form_definition.id'), table=<library_dataset_dataset_info_association>), Column('form_values_id', Integer(), ForeignKey('form_values.id'), table=<library_dataset_dataset_info_association>), Column('deleted', Boolean(), table=<library_dataset_dataset_info_association>, default=ColumnDefault(False)), schema=None)
class galaxy.model.ImplicitlyConvertedDatasetAssociation(id=None, parent=None, dataset=None, file_type=None, deleted=False, purged=False, metadata_safe=True)[source]

Bases: Base, RepresentById

create_time
update_time
hda_id
ldda_id
hda_parent_id
ldda_parent_id
__init__(id=None, parent=None, dataset=None, file_type=None, deleted=False, purged=False, metadata_safe=True)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id: int
dataset
dataset_ldda
parent_hda
parent_ldda
type
deleted
metadata_safe
clear(purge=False, delete_dataset=True)[source]
table = Table('implicitly_converted_dataset_association', MetaData(), Column('id', Integer(), table=<implicitly_converted_dataset_association>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<implicitly_converted_dataset_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<implicitly_converted_dataset_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('hda_id', Integer(), ForeignKey('history_dataset_association.id'), table=<implicitly_converted_dataset_association>), Column('ldda_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<implicitly_converted_dataset_association>), Column('hda_parent_id', Integer(), ForeignKey('history_dataset_association.id'), table=<implicitly_converted_dataset_association>), Column('ldda_parent_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<implicitly_converted_dataset_association>), Column('deleted', Boolean(), table=<implicitly_converted_dataset_association>, default=ColumnDefault(False)), Column('metadata_safe', Boolean(), table=<implicitly_converted_dataset_association>, default=ColumnDefault(True)), Column('type', TrimmedString(length=255), table=<implicitly_converted_dataset_association>), schema=None)
class galaxy.model.InnerCollectionFilter(column, operator_function, expected_value)[source]

Bases: tuple

property column

Alias for field number 0

property operator_function

Alias for field number 1

property expected_value

Alias for field number 2

produce_filter(table)[source]
class galaxy.model.DatasetCollection(id=None, collection_type=None, populated=True, element_count=None)[source]

Bases: Base, Dictifiable, UsesAnnotations, Serializable

populated_state_message
create_time
update_time
elements
dict_collection_visible_keys = ['id', 'collection_type']
dict_element_visible_keys = ['id', 'collection_type']
class populated_states(value)[source]

Bases: str, Enum

An enumeration.

NEW = 'new'
OK = 'ok'
FAILED = 'failed'
__init__(id=None, collection_type=None, populated=True, element_count=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

id: int
collection_type
populated_state
element_count
property dataset_states_and_extensions_summary
property has_deferred_data
property populated_optimized
property populated
property dataset_action_tuples
property element_identifiers_extensions_and_paths
property element_identifiers_extensions_paths_and_metadata_files: List[List[Any]]
property waiting_for_elements
mark_as_populated()[source]
handle_population_failed(message)[source]
finalize(collection_type_description)[source]
property dataset_instances
property dataset_elements
dataset_elements_and_identifiers(identifiers=None)[source]
property first_dataset_element
property state
validate()[source]
copy(destination=None, element_destination=None, dataset_instance_attributes=None, flush=True, minimize_copies=False)[source]
replace_failed_elements(replacements)[source]
set_from_dict(new_data)[source]
property has_subcollections
table = Table('dataset_collection', MetaData(), Column('id', Integer(), table=<dataset_collection>, primary_key=True, nullable=False), Column('collection_type', Unicode(length=255), table=<dataset_collection>, nullable=False), Column('populated_state', TrimmedString(length=64), table=<dataset_collection>, nullable=False, default=ColumnDefault('ok')), Column('populated_state_message', TEXT(), table=<dataset_collection>), Column('element_count', Integer(), table=<dataset_collection>), Column('create_time', DateTime(), table=<dataset_collection>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<dataset_collection>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.DatasetCollectionInstance[source]

Bases: HasName, UsesCreateAndUpdateTime

property state
property populated
property dataset_instances
display_name()[source]
set_from_dict(new_data)[source]

Set object attributes to the values in dictionary new_data limiting to only those keys in dict_element_visible_keys.

Returns a dictionary of the keys, values that have been changed.

property has_deferred_data
update_time: DateTime
class galaxy.model.HistoryDatasetCollectionAssociation(deleted=False, visible=True, **kwd)[source]

Bases: Base, DatasetCollectionInstance, HasTags, Dictifiable, UsesAnnotations, Serializable

Associates a DatasetCollection with a History.

id: int
collection_id
history_id
name
hid
copied_from_history_dataset_collection_association_id
implicit_output_name
job_id
implicit_collection_jobs_id
create_time
update_time: DateTime
collection
history
copied_from_history_dataset_collection_association
copied_to_history_dataset_collection_association
implicit_collection_jobs
job
job_state_summary
tags: List[ItemTagAssociation]
annotations
ratings
creating_job_associations
dict_dbkeysandextensions_visible_keys = ['dbkeys', 'extensions']
editable_keys = ('name', 'deleted', 'visible')
__init__(deleted=False, visible=True, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

deleted
visible
implicit_input_collections
property history_content_type
content_type = 'dataset_collection'
type_id
property job_source_type
property job_state_summary_dict
property dataset_dbkeys_and_extensions_summary
property job_source_id
touch()[source]
to_hda_representative(multiple=False)[source]
to_dict(view='collection')[source]

Return item dictionary.

add_implicit_input_collection(name, history_dataset_collection)[source]
find_implicit_input_collection(name)[source]
copy(element_destination=None, dataset_instance_attributes=None, flush=True, set_hid=True, minimize_copies=False)[source]

Create a copy of this history dataset collection association. Copy underlying collection.

property waiting_for_elements
contains_collection(collection_id)[source]

Checks to see that the indicated collection is a member of the hdca by using a recursive CTE sql query to find the collection’s parents and checking to see if any of the parents are associated with this hdca

table = Table('history_dataset_collection_association', MetaData(), Column('id', Integer(), table=<history_dataset_collection_association>, primary_key=True, nullable=False), Column('collection_id', Integer(), ForeignKey('dataset_collection.id'), table=<history_dataset_collection_association>), Column('history_id', Integer(), ForeignKey('history.id'), table=<history_dataset_collection_association>), Column('name', TrimmedString(length=255), table=<history_dataset_collection_association>), Column('hid', Integer(), table=<history_dataset_collection_association>), Column('visible', Boolean(), table=<history_dataset_collection_association>), Column('deleted', Boolean(), table=<history_dataset_collection_association>, default=ColumnDefault(False)), Column('copied_from_history_dataset_collection_association_id', Integer(), ForeignKey('history_dataset_collection_association.id'), table=<history_dataset_collection_association>), Column('implicit_output_name', Unicode(length=255), table=<history_dataset_collection_association>), Column('job_id', Integer(), ForeignKey('job.id'), table=<history_dataset_collection_association>), Column('implicit_collection_jobs_id', Integer(), ForeignKey('implicit_collection_jobs.id'), table=<history_dataset_collection_association>), Column('create_time', DateTime(), table=<history_dataset_collection_association>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<history_dataset_collection_association>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), schema=None)
class galaxy.model.LibraryDatasetCollectionAssociation(deleted=False, **kwd)[source]

Bases: Base, DatasetCollectionInstance, RepresentById

Associates a DatasetCollection with a library folder.

id: int
collection_id
folder_id
name
collection
folder
tags
annotations
ratings
editable_keys = ('name', 'deleted')
__init__(deleted=False, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

deleted
to_dict(view='collection')[source]
table = Table('library_dataset_collection_association', MetaData(), Column('id', Integer(), table=<library_dataset_collection_association>, primary_key=True, nullable=False), Column('collection_id', Integer(), ForeignKey('dataset_collection.id'), table=<library_dataset_collection_association>), Column('folder_id', Integer(), ForeignKey('library_folder.id'), table=<library_dataset_collection_association>), Column('name', TrimmedString(length=255), table=<library_dataset_collection_association>), Column('deleted', Boolean(), table=<library_dataset_collection_association>, default=ColumnDefault(False)), schema=None)
class galaxy.model.DatasetCollectionElement(id=None, collection=None, element=None, element_index=None, element_identifier=None)[source]

Bases: Base, Dictifiable, Serializable

Associates a DatasetInstance (hda or ldda) with a DatasetCollection.

dataset_collection_id
hda_id
ldda_id
child_collection_id
dict_collection_visible_keys = ['id', 'element_type', 'element_index', 'element_identifier']
dict_element_visible_keys = ['id', 'element_type', 'element_index', 'element_identifier']
UNINITIALIZED_ELEMENT = <object object>
__init__(id=None, collection=None, element=None, element_index=None, element_identifier=None)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

hda
ldda
child_collection
id: int
collection
element_index
element_identifier
property element_type
property is_collection
property element_object
property dataset_instance
property dataset
first_dataset_instance()[source]
property dataset_instances
property has_deferred_data
copy_to_collection(collection, destination=None, element_destination=None, dataset_instance_attributes=None, flush=True, minimize_copies=False)[source]
table = Table('dataset_collection_element', MetaData(), Column('id', Integer(), table=<dataset_collection_element>, primary_key=True, nullable=False), Column('dataset_collection_id', Integer(), ForeignKey('dataset_collection.id'), table=<dataset_collection_element>, nullable=False), Column('hda_id', Integer(), ForeignKey('history_dataset_association.id'), table=<dataset_collection_element>), Column('ldda_id', Integer(), ForeignKey('library_dataset_dataset_association.id'), table=<dataset_collection_element>), Column('child_collection_id', Integer(), ForeignKey('dataset_collection.id'), table=<dataset_collection_element>), Column('element_index', Integer(), table=<dataset_collection_element>), Column('element_identifier', Unicode(length=255), table=<dataset_collection_element>), schema=None)
class galaxy.model.Event(**kwargs)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
history_id
user_id
message
session_id
tool_id
history
user
galaxy_session
__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

table = Table('event', MetaData(), Column('id', Integer(), table=<event>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<event>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<event>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('history_id', Integer(), ForeignKey('history.id'), table=<event>), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<event>), Column('message', TrimmedString(length=1024), table=<event>), Column('session_id', Integer(), ForeignKey('galaxy_session.id'), table=<event>), Column('tool_id', String(length=255), table=<event>), schema=None)
class galaxy.model.GalaxySession(is_valid=False, **kwd)[source]

Bases: Base, RepresentById

id: int
create_time
update_time
user_id
remote_host
remote_addr
referer
current_history_id
session_key
prev_session_id
disk_usage
current_history
histories
user
__init__(is_valid=False, **kwd)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

is_valid
last_action
add_history(history, association=None)[source]
get_disk_usage()[source]
set_disk_usage(bytes)[source]
property total_disk_usage
table = Table('galaxy_session', MetaData(), Column('id', Integer(), table=<galaxy_session>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<galaxy_session>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<galaxy_session>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('user_id', Integer(), ForeignKey('galaxy_user.id'), table=<galaxy_session>), Column('remote_host', String(length=255), table=<galaxy_session>), Column('remote_addr', String(length=255), table=<galaxy_session>), Column('referer', TEXT(), table=<galaxy_session>), Column('current_history_id', Integer(), ForeignKey('history.id'), table=<galaxy_session>), Column('session_key', TrimmedString(length=255), table=<galaxy_session>), Column('is_valid', Boolean(), table=<galaxy_session>, default=ColumnDefault(False)), Column('prev_session_id', Integer(), table=<galaxy_session>), Column('disk_usage', Numeric(precision=15, scale=0), table=<galaxy_session>), Column('last_action', DateTime(), table=<galaxy_session>), schema=None)
class galaxy.model.GalaxySessionToHistoryAssociation(galaxy_session, history)[source]

Bases: Base, RepresentById

id: int
create_time
session_id
history_id
__init__(galaxy_session, history)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

galaxy_session
history
table = Table('galaxy_session_to_history', MetaData(), Column('id', Integer(), table=<galaxy_session_to_history>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<galaxy_session_to_history>, default=ColumnDefault(<function datetime.utcnow>)), Column('session_id', Integer(), ForeignKey('galaxy_session.id'), table=<galaxy_session_to_history>), Column('history_id', Integer(), ForeignKey('history.id'), table=<galaxy_session_to_history>), schema=None)
class galaxy.model.UCI[source]

Bases: object

__init__()[source]
class galaxy.model.StoredWorkflow(user=None, name=None, slug=None, create_time=None, update_time=None, published=False, latest_workflow_id=None, workflow=None, hidden=False)[source]

Bases: Base, HasTags, Dictifiable, RepresentById

StoredWorkflow represents the root node of a tree of objects that compose a workflow, including workflow revisions, steps, and subworkflows. It is responsible for the metadata associated with a workflow including owner, name, published, and create/update time.

Each time a workflow is modified a revision is created, represented by a new