diff env/lib/python3.9/site-packages/bioblend/toolshed/categories/__init__.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/env/lib/python3.9/site-packages/bioblend/toolshed/categories/__init__.py	Mon Mar 22 18:12:50 2021 +0000
@@ -0,0 +1,47 @@
+"""
+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.
+          For example::
+
+            [{'deleted': False,
+              'description': 'Tools for manipulating data',
+              'id': '175812cd7caaf439',
+              'model_class': 'Category',
+              'name': 'Text Manipulation',
+              'url': '/api/categories/175812cd7caaf439'}]
+
+        .. versionadded:: 0.5.2
+        """
+        return self._get(deleted=deleted)
+
+    def show_category(self, category_id):
+        """
+        Get details of a given category.
+
+        :type category_id: str
+        :param category_id: Encoded category ID
+
+        :rtype: dict
+        :return: details of the given category
+        """
+        return self._get(id=category_id)