Warning

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

tool_shed.webapp.model package

tool_shed.webapp.model.now()

Return a new datetime representing UTC day and time.

class tool_shed.webapp.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 tool_shed.webapp.model.APIKeys(**kwargs)[source]

Bases: tool_shed.webapp.model.Base, object

id
create_time
user_id
key
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.

class tool_shed.webapp.model.User(email=None, password=None)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
username
active_repositories
galaxy_sessions
api_keys
reset_tokens
groups
dict_collection_visible_keys = ['id', 'username']
dict_element_visible_keys = ['id', 'username']
bootstrap_admin_user = False
roles
non_private_roles
repository_reviews
__init__(email=None, password=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
new_repo_alert
all_roles()[source]
check_password(cleartext)[source]

Check if ‘cleartext’ matches ‘self.password’ when hashed.

get_disk_usage(nice_size=False)[source]
property nice_total_disk_usage
set_disk_usage(bytes)[source]
property total_disk_usage
set_password_cleartext(cleartext)[source]
class tool_shed.webapp.model.PasswordResetToken(user, token=None)[source]

Bases: tool_shed.webapp.model.Base, object

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
class tool_shed.webapp.model.Group(name=None)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
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
class tool_shed.webapp.model.Role(name=None, description=None, type='system', deleted=False)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
repositories
groups
users
dict_collection_visible_keys = ['id', 'name']
dict_element_visible_keys = ['id', 'name', 'description', 'type']
private_id = None
types = <galaxy.util.bunch.Bunch object>
__init__(name=None, description=None, type='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
property is_repository_admin_role
class tool_shed.webapp.model.UserGroupAssociation(user, group)[source]

Bases: tool_shed.webapp.model.Base, object

id
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
class tool_shed.webapp.model.UserRoleAssociation(user, role)[source]

Bases: tool_shed.webapp.model.Base, object

id
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
class tool_shed.webapp.model.GroupRoleAssociation(group, role)[source]

Bases: tool_shed.webapp.model.Base, object

id
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
class tool_shed.webapp.model.RepositoryRoleAssociation(repository, role)[source]

Bases: tool_shed.webapp.model.Base, object

id
repository_id
role_id
create_time
update_time
__init__(repository, 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.

repository
role
class tool_shed.webapp.model.GalaxySession(is_valid=False, **kwd)[source]

Bases: tool_shed.webapp.model.Base, object

id
create_time
update_time
user_id
remote_host
remote_addr
referer
session_key
prev_session_id
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
class tool_shed.webapp.model.Repository(private=False, times_downloaded=0, deprecated=False, **kwd)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
type
remote_repository_url
homepage_url
description
long_description
user_id
deleted
email_alerts
categories
ratings
user
downloadable_revisions
metadata_revisions
roles
reviews
reviewers
dict_collection_visible_keys = ['id', 'name', 'type', 'remote_repository_url', 'homepage_url', 'description', 'user_id', 'private', 'deleted', 'times_downloaded', 'deprecated', 'create_time']
dict_element_visible_keys = ['id', 'name', 'type', 'remote_repository_url', 'homepage_url', 'description', 'long_description', 'user_id', 'private', 'deleted', 'times_downloaded', 'deprecated', 'create_time']
file_states = <galaxy.util.bunch.Bunch object>
__init__(private=False, times_downloaded=0, deprecated=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.

private
times_downloaded
deprecated
name
property hg_repo
property admin_role
allow_push()[source]
can_change_type()[source]
can_change_type_to(app, new_type_label)[source]
get_changesets_for_setting_metadata(app)[source]
get_repository_dependencies(app, changeset, toolshed_url)[source]
get_type_class(app)[source]
get_tool_dependencies(app, changeset_revision)[source]
installable_revisions(app, sort_revisions=True)[source]
is_new()[source]
repo_path(app=None)[source]
revision()[source]
set_allow_push(usernames, remove_auth='')[source]
tip()[source]
to_dict(view='collection', value_mapper=None)[source]

Return item dictionary.

class tool_shed.webapp.model.RepositoryReview(deleted=False, **kwd)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
repository_id
changeset_revision
user_id
approved
rating
repository
repository_metadata
user
component_reviews
private_component_reviews
dict_collection_visible_keys = ['id', 'repository_id', 'changeset_revision', 'user_id', 'rating', 'deleted']
dict_element_visible_keys = ['id', 'repository_id', 'changeset_revision', 'user_id', 'rating', 'deleted']
approved_states = <galaxy.util.bunch.Bunch object>
__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
class tool_shed.webapp.model.ComponentReview(private=False, approved=False, deleted=False, **kwd)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
repository_review_id
component_id
comment
rating
repository_review
component
dict_collection_visible_keys = ['id', 'repository_review_id', 'component_id', 'private', 'approved', 'rating', 'deleted']
dict_element_visible_keys = ['id', 'repository_review_id', 'component_id', 'private', 'approved', 'rating', 'deleted']
approved_states = <galaxy.util.bunch.Bunch object>
__init__(private=False, approved=False, 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.

private
approved
deleted
class tool_shed.webapp.model.Component(**kwargs)[source]

Bases: tool_shed.webapp.model.Base, object

id
name
description
__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 tool_shed.webapp.model.ItemRatingAssociation(id=None, user=None, item=None, rating=0, comment='')[source]

Bases: object

__init__(id=None, user=None, item=None, rating=0, comment='')[source]
set_item(item)[source]

Set association’s item.

class tool_shed.webapp.model.RepositoryRatingAssociation(**kwargs)[source]

Bases: tool_shed.webapp.model.Base, tool_shed.webapp.model.ItemRatingAssociation, object

id
create_time
update_time
repository_id
user_id
rating
comment
repository
user
set_item(repository)[source]

Set association’s item.

__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 tool_shed.webapp.model.Category(deleted=False, **kwd)[source]

Bases: tool_shed.webapp.model.Base, galaxy.util.dictifiable.Dictifiable, object

id
create_time
update_time
name
description
repositories
dict_collection_visible_keys = ['id', 'name', 'description', 'deleted']
dict_element_visible_keys = ['id', 'name', 'description', '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
class tool_shed.webapp.model.RepositoryCategoryAssociation(repository=None, category=None)[source]

Bases: tool_shed.webapp.model.Base, object

id
repository_id
category_id
__init__(repository=None, category=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.

repository
category
class tool_shed.webapp.model.Tag(**kwargs)[source]

Bases: tool_shed.webapp.model.Base, object

__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.

id
type
parent_id
name
children
parent
class tool_shed.webapp.model.RepositoryMetadata(id=None, repository_id=None, numeric_revision=None, changeset_revision=None, metadata=None, tool_versions=None, malicious=False, downloadable=False, missing_test_components=None, tools_functionally_correct=False, test_install_error=False, has_repository_dependencies=False, includes_datatypes=False, includes_tools=False, includes_tool_dependencies=False, includes_workflows=False)[source]

Bases: galaxy.util.dictifiable.Dictifiable, object

create_time
repository
reviews
update_time
table = Table('repository_metadata', MetaData(), Column('id', Integer(), table=<repository_metadata>, primary_key=True, nullable=False), Column('create_time', DateTime(), table=<repository_metadata>, default=ColumnDefault(<function datetime.utcnow>)), Column('update_time', DateTime(), table=<repository_metadata>, onupdate=ColumnDefault(<function datetime.utcnow>), default=ColumnDefault(<function datetime.utcnow>)), Column('repository_id', Integer(), ForeignKey('repository.id'), table=<repository_metadata>), Column('changeset_revision', TrimmedString(length=255), table=<repository_metadata>), Column('numeric_revision', Integer(), table=<repository_metadata>), Column('metadata', MutableJSONType(), table=<repository_metadata>), Column('tool_versions', MutableJSONType(), table=<repository_metadata>), Column('malicious', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('downloadable', Boolean(), table=<repository_metadata>, default=ColumnDefault(True)), Column('missing_test_components', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('has_repository_dependencies', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('includes_datatypes', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('includes_tools', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('includes_tool_dependencies', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), Column('includes_workflows', Boolean(), table=<repository_metadata>, default=ColumnDefault(False)), schema=None)
dict_collection_visible_keys = ['id', 'repository_id', 'numeric_revision', 'changeset_revision', 'malicious', 'downloadable', 'missing_test_components', 'has_repository_dependencies', 'includes_datatypes', 'includes_tools', 'includes_tool_dependencies', 'includes_tools_for_display_in_tool_panel', 'includes_workflows']
dict_element_visible_keys = ['id', 'repository_id', 'numeric_revision', 'changeset_revision', 'malicious', 'downloadable', 'missing_test_components', 'has_repository_dependencies', 'includes_datatypes', 'includes_tools', 'includes_tool_dependencies', 'includes_tools_for_display_in_tool_panel', 'includes_workflows', 'repository_dependencies']
__init__(id=None, repository_id=None, numeric_revision=None, changeset_revision=None, metadata=None, tool_versions=None, malicious=False, downloadable=False, missing_test_components=None, tools_functionally_correct=False, test_install_error=False, has_repository_dependencies=False, includes_datatypes=False, includes_tools=False, includes_tool_dependencies=False, includes_workflows=False)
id
repository_id
numeric_revision
changeset_revision
metadata
tool_versions
malicious
downloadable
missing_test_components
has_repository_dependencies
includes_datatypes
includes_tools
includes_tool_dependencies
includes_workflows
property includes_tools_for_display_in_tool_panel
property repository_dependencies
tool_shed.webapp.model.sort_by_attr(seq, attr)[source]

Sort the sequence of objects by object’s attribute Arguments: seq - the list or any sequence (including immutable one) of objects to sort. attr - the name of attribute to sort by

Subpackages

Submodules

tool_shed.webapp.model.mapping module

Details of how the data model objects are mapped onto the relational database are encapsulated here.

class tool_shed.webapp.model.mapping.ToolShedModelMapping(model_modules, engine)[source]

Bases: galaxy.model.base.SharedModelMapping

security_agent: tool_shed.webapp.security.CommunityRBACAgent
shed_counter: tool_shed.webapp.util.shed_statistics.ShedCounter
create_tables: bool
tool_shed.webapp.model.mapping.init(file_path, url, engine_options=None, create_tables=False) tool_shed.webapp.model.mapping.ToolShedModelMapping[source]

Connect mappings to the database