Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/planemo/database/interface.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
1 """Describe the interface classes of the planemo.database package.""" | |
2 | |
3 import abc | |
4 | |
5 | |
6 class DatabaseSource(object): | |
7 """Interface describing a source of profile databases.""" | |
8 | |
9 __metaclass__ = abc.ABCMeta | |
10 | |
11 @abc.abstractmethod | |
12 def create_database(self, identifier): | |
13 """Create a database with specified short identifier. | |
14 | |
15 Throw an exception if it already exists. | |
16 """ | |
17 | |
18 @abc.abstractmethod | |
19 def delete_database(self, identifier): | |
20 """Delete a database with specified short identifier. | |
21 | |
22 Throw an exception if it already exists. | |
23 """ | |
24 | |
25 @abc.abstractmethod | |
26 def list_databases(self): | |
27 """Return identifiers associated with database source.""" | |
28 | |
29 @abc.abstractmethod | |
30 def sqlalchemy_url(self, identifier): | |
31 """Return a URL string for use by sqlalchemy.""" | |
32 | |
33 | |
34 __all__ = ( | |
35 "DatabaseSource", | |
36 ) |