Mercurial > repos > guerler > springsuite
comparison planemo/lib/python3.7/site-packages/bioblend/toolshed/__init__.py @ 0:d30785e31577 draft
"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author | guerler |
---|---|
date | Fri, 31 Jul 2020 00:18:57 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:d30785e31577 |
---|---|
1 """ | |
2 A base representation of an instance of Tool Shed | |
3 """ | |
4 from bioblend.galaxyclient import GalaxyClient | |
5 from bioblend.toolshed import categories, repositories, tools | |
6 | |
7 | |
8 class ToolShedInstance(GalaxyClient): | |
9 def __init__(self, url, key=None, email=None, password=None, verify=True): | |
10 """ | |
11 A base representation of a connection to a ToolShed instance, identified | |
12 by the ToolShed URL and user credentials. | |
13 | |
14 After you have created a ``ToolShedInstance`` object, access various | |
15 modules via the class fields. For example, to work with repositories and | |
16 get a list of all public repositories, the following should be done:: | |
17 | |
18 from bioblend import toolshed | |
19 | |
20 ts = toolshed.ToolShedInstance(url='https://testtoolshed.g2.bx.psu.edu') | |
21 | |
22 rl = ts.repositories.get_repositories() | |
23 | |
24 tools = ts.tools.search_tools('fastq') | |
25 | |
26 :type url: str | |
27 :param url: A FQDN or IP for a given instance of ToolShed. For example: | |
28 https://testtoolshed.g2.bx.psu.edu . If a ToolShed instance | |
29 is served under a prefix (e.g. | |
30 http://127.0.0.1:8080/toolshed/), supply the entire URL | |
31 including the prefix (note that the prefix must end with a | |
32 slash). | |
33 | |
34 :type key: str | |
35 :param key: If required, user's API key for the given instance of ToolShed, | |
36 obtained from the user preferences. | |
37 | |
38 :type email: str | |
39 :param email: ToolShed e-mail address corresponding to the user. | |
40 Ignored if key is supplied directly. | |
41 | |
42 :type password: str | |
43 :param password: Password of ToolShed account corresponding to the above | |
44 e-mail address. Ignored if key is supplied directly. | |
45 | |
46 :param verify: Whether to verify the server's TLS certificate | |
47 :type verify: bool | |
48 """ | |
49 super().__init__(url, key, email, password, verify=verify) | |
50 self.categories = categories.ToolShedCategoryClient(self) | |
51 self.repositories = repositories.ToolShedRepositoryClient(self) | |
52 self.tools = tools.ToolShedToolClient(self) |