Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/planemo/database/interface.py @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
comparison
equal
deleted
inserted
replaced
4:79f47841a781 | 5:9b1c78e6ba9c |
---|---|
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 ) |