Warning

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

galaxy.webapps.tool_shed package

The Galaxy Tool Shed application.

galaxy.webapps.tool_shed.url_for(*args, **kargs)[source]

Generates a URL

All keys given to url_for are sent to the Routes Mapper instance for generation except for:

anchor          specified the anchor name to be appened to the path
host            overrides the default (current) host if provided
protocol        overrides the default (current) protocol if provided
qualified       creates the URL with the host/port information as
                needed

The URL is generated based on the rest of the keys. When generating a new URL, values will be used from the current request’s parameters (if present). The following rules are used to determine when and how to keep the current requests parameters:

  • If the controller is present and begins with ‘/’, no defaults are used
  • If the controller is changed, action is set to ‘index’ unless otherwise specified

For example, if the current request yielded a dict of {‘controller’: ‘blog’, ‘action’: ‘view’, ‘id’: 2}, with the standard ‘:controller/:action/:id’ route, you’d get the following results:

url_for(id=4)                    =>  '/blog/view/4',
url_for(controller='/admin')     =>  '/admin',
url_for(controller='admin')      =>  '/admin/view/2'
url_for(action='edit')           =>  '/blog/edit/2',
url_for(action='list', id=None)  =>  '/blog/list'

Static and Named Routes

If there is a string present as the first argument, a lookup is done against the named routes table to see if there’s any matching routes. The keyword defaults used with static routes will be sent in as GET query arg’s if a route matches.

If no route by that name is found, the string is assumed to be a raw URL. Should the raw URL begin with / then appropriate SCRIPT_NAME data will be added if present, otherwise the string will be used as the url with keyword args becoming GET query args.

galaxy.webapps.tool_shed.expose(func)[source]

Decorator: mark a function as ‘exposed’ and thus web accessible

Subpackages

Submodules

galaxy.webapps.tool_shed.app module

class galaxy.webapps.tool_shed.app.UniverseApplication(**kwd)[source]

Bases: object

Encapsulates the state of a Universe application

__init__(**kwd)[source]
shutdown()[source]

galaxy.webapps.tool_shed.buildapp module

Provides factory methods to assemble the Galaxy web application

class galaxy.webapps.tool_shed.buildapp.CommunityWebApplication(galaxy_app, session_cookie='galaxysession', name=None)[source]

Bases: galaxy.web.framework.webapp.WebApplication

galaxy.webapps.tool_shed.buildapp.add_ui_controllers(webapp, app)[source]

Search for controllers in the ‘galaxy.webapps.controllers’ module and add them to the webapp.

galaxy.webapps.tool_shed.buildapp.app_factory(global_conf, load_app_kwds={}, **kwargs)[source]

Return a wsgi application serving the root object

galaxy.webapps.tool_shed.buildapp.wrap_in_middleware(app, global_conf, application_stack, **local_conf)[source]

Based on the configuration wrap app in a set of common and useful middleware.

galaxy.webapps.tool_shed.buildapp.wrap_in_static(app, global_conf, **local_conf)[source]
galaxy.webapps.tool_shed.buildapp.uwsgi_app()[source]

galaxy.webapps.tool_shed.config module

Universe configuration builder.

galaxy.webapps.tool_shed.config.resolve_path(path, root)[source]

If ‘path’ is relative make absolute by prepending ‘root’

exception galaxy.webapps.tool_shed.config.ConfigurationError[source]

Bases: exceptions.Exception

class galaxy.webapps.tool_shed.config.ToolShedAppConfiguration(**kwargs)[source]

Bases: galaxy.config.BaseAppConfiguration

default_config_file_name = 'tool_shed.yml'
__init__(**kwargs)[source]
shed_tool_data_path
sentry_dsn_public

Sentry URL with private key removed for use in client side scripts, sentry server will need to be configured to accept events

parse_config_file_options(kwargs)[source]
get(key, default)[source]
get_bool(key, default)[source]
check()[source]
is_admin_user(user)[source]

Determine if the provided user is listed in admin_users.

galaxy.webapps.tool_shed.config.Configuration

alias of galaxy.webapps.tool_shed.config.ToolShedAppConfiguration

galaxy.webapps.tool_shed.config.get_database_engine_options(kwargs)[source]

Allow options for the SQLAlchemy database engine to be passed by using the prefix “database_engine_option”.