diff env/lib/python3.9/site-packages/bioblend/galaxy/config/__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/galaxy/config/__init__.py	Mon Mar 22 18:12:50 2021 +0000
@@ -0,0 +1,50 @@
+"""
+Contains possible interaction dealing with Galaxy configuration.
+
+"""
+from bioblend.galaxy.client import Client
+
+
+class ConfigClient(Client):
+
+    def __init__(self, galaxy_instance):
+        self.module = 'configuration'
+        super().__init__(galaxy_instance)
+
+    def get_config(self):
+        """
+        Get a list of attributes about the Galaxy instance. More attributes will
+        be present if the user is an admin.
+
+        :rtype: list
+        :return: A list of attributes.
+          For example::
+
+            {'allow_library_path_paste': False,
+             'allow_user_creation': True,
+             'allow_user_dataset_purge': True,
+             'allow_user_deletion': False,
+             'enable_unique_workflow_defaults': False,
+             'ftp_upload_dir': '/SOMEWHERE/galaxy/ftp_dir',
+             'ftp_upload_site': 'galaxy.com',
+             'library_import_dir': 'None',
+             'logo_url': None,
+             'support_url': 'https://galaxyproject.org/support',
+             'terms_url': None,
+             'user_library_import_dir': None,
+             'wiki_url': 'https://galaxyproject.org/'}
+        """
+        return self._get()
+
+    def get_version(self):
+        """
+        Get the current version of the Galaxy instance.
+
+        :rtype: dict
+        :return: Version of the Galaxy instance
+          For example::
+
+            {'extra': {}, 'version_major': '17.01'}
+        """
+        url = self.gi.url + '/version'
+        return self._get(url=url)