How to use the bioblend.galaxy.client.Client function in bioblend

To help you get started, we’ve selected a few bioblend examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github galaxyproject / bioblend / bioblend / _tests / TestGalaxyInstance.py View on Github external
def test_set_retry_delay(self):
        self.gi.get_retry_delay = 5
        self.assertEqual(5, Client.get_retry_delay())
github galaxyproject / bioblend / bioblend / galaxy / workflows / __init__.py View on Github external
"""
Contains possible interactions with the Galaxy Workflows
"""
import json
import os

from bioblend.galaxy.client import Client


class WorkflowClient(Client):
    def __init__(self, galaxy_instance):
        self.module = 'workflows'
        super(WorkflowClient, self).__init__(galaxy_instance)

    # the 'deleted' option is not available for workflows
    def get_workflows(self, workflow_id=None, name=None, published=False):
        """
        Get all workflows or filter the specific one(s) via the provided ``name``
        or ``workflow_id``. Provide only one argument, ``name`` or ``workflow_id``,
        but not both.

        :type workflow_id: str
        :param workflow_id: Encoded workflow ID (incompatible with ``name``)

        :type name: str
        :param name: Filter by name of workflow (incompatible with
github galaxyproject / bioblend / bioblend / toolshed / tools / __init__.py View on Github external
"""
Interaction with a Tool Shed instance tools
"""
from bioblend.galaxy.client import Client


class ToolShedToolClient(Client):

    def __init__(self, toolshed_instance):
        self.module = 'tools'
        super().__init__(toolshed_instance)

    def search_tools(self, q, page=1, page_size=10):
        """
        Search for tools in a Galaxy Tool Shed.

        :type q: str
        :param q: query string for searching purposes

        :type page: int
        :param page: page requested

        :type page_size: int
github galaxyproject / bioblend / bioblend / galaxy / users / __init__.py View on Github external
"""
Contains possible interaction dealing with Galaxy users.

Most of these methods must be executed by a registered Galaxy admin user.
"""
from bioblend.galaxy.client import Client


class UserClient(Client):

    def __init__(self, galaxy_instance):
        self.module = 'users'
        super().__init__(galaxy_instance)

    def get_users(self, deleted=False, f_email=None, f_name=None, f_any=None):
        """
        Get a list of all registered users. If ``deleted`` is set to ``True``,
        get a list of deleted users.

        :type deleted: bool
        :param deleted: Whether to include deleted users


        :type f_email: str
        :param f_email: filter for user emails. The filter will be active for
github galaxyproject / bioblend / bioblend / galaxy / libraries / __init__.py View on Github external
Contains possible interactions with the Galaxy Data Libraries
"""
import logging
import time

from bioblend.galaxy.client import Client
from bioblend.galaxy.datasets import (
    DatasetTimeoutException,
    TERMINAL_STATES,
)
from bioblend.util import attach_file

log = logging.getLogger(__name__)


class LibraryClient(Client):

    def __init__(self, galaxy_instance):
        self.module = 'libraries'
        super().__init__(galaxy_instance)

    def create_library(self, name, description=None, synopsis=None):
        """
        Create a data library with the properties defined in the arguments.

        :type name: str
        :param name: Name of the new data library

        :type description: str
        :param description: Optional data library description

        :type synopsis: str
github galaxyproject / planemo / planemo / galaxy / activity.py View on Github external
def _get_extra_files(self, dataset_details):
        extra_files_url = "%s/%s/contents/%s/extra_files" % (
            self._user_gi._make_url(self._user_gi.histories), self._history_id, dataset_details["id"]
        )
        extra_files = Client._get(self._user_gi.jobs, url=extra_files_url)
        return extra_files
github galaxyproject / bioblend / bioblend / toolshed / categories / __init__.py View on Github external
"""
Interaction with a Tool Shed instance categories
"""
from bioblend.galaxy.client import Client


class ToolShedCategoryClient(Client):

    def __init__(self, toolshed_instance):
        self.module = 'categories'
        super().__init__(toolshed_instance)

    def get_categories(self, deleted=False):
        """
        Returns a list of dictionaries that contain descriptions of the
        repository categories found on the given Tool Shed instance.

        :type deleted: bool
        :param deleted: whether to show deleted categories

        :rtype: list
        :return: A list of dictionaries containing information about
          repository categories present in the Tool Shed.
github galaxyproject / bioblend / bioblend / galaxy / toolshed / __init__.py View on Github external
"""
Interaction with a Galaxy Tool Shed.
"""
from bioblend.galaxy.client import Client


class ToolShedClient(Client):

    def __init__(self, galaxy_instance):
        self.module = 'tool_shed_repositories'
        super().__init__(galaxy_instance)

    def get_repositories(self):
        """
        Get the list of all installed Tool Shed repositories on this Galaxy instance.

        :rtype: list
        :return: a list of dictionaries containing information about
          repositories present in the Tool Shed.
          For example::

            [{'changeset_revision': '4afe13ac23b6',
              'deleted': False,
github galaxyproject / bioblend / bioblend / galaxy / forms / __init__.py View on Github external
"""
Contains possible interactions with the Galaxy Forms
"""
from bioblend.galaxy.client import Client


class FormsClient(Client):

    def __init__(self, galaxy_instance):
        self.module = 'forms'
        super().__init__(galaxy_instance)

    def get_forms(self):
        """
        Get the list of all forms.

        :rtype: list
        :return: Displays a collection (list) of forms.
          For example::

            [{'id': 'f2db41e1fa331b3e',
              'model_class': 'FormDefinition',
              'name': 'First form',
github galaxyproject / bioblend / bioblend / galaxy / visual / __init__.py View on Github external
"""
Contains possible interactions with the Galaxy visualization
"""
from bioblend.galaxy.client import Client


class VisualClient(Client):

    def __init__(self, galaxy_instance):
        self.module = 'visualizations'
        super().__init__(galaxy_instance)

    def get_visualizations(self):
        """
        Get the list of all visualizations.

        :rtype: list
        :return: A list of dicts with details on individual visualizations.
          For example::

            [{'dbkey': 'eschColi_K12',
              'id': 'df1c7c96fc427c2d',
              'title': 'AVTest1',