database (class) ∞
-
class
database(log, settings=False)[source] ∞ Bases:
objectthe database object for sherlock, setting up ssh tunnels and various database connections
- The returned dictionary of database connections contain the following databases:
transients– the database hosting the transient source datacatalogues– connection to the database hosting the contextual catalogues the transients are to be crossmatched against
Key Arguments
log– loggersettings– the settings dictionary
Return
dbConns– a dictionary of the database connections required by sherlock
Usage
To setup the sherlock database connections, run the following:
# SETUP ALL DATABASE CONNECTIONS from sherlock import database db = database( log=log, settings=settings ) dbConns, dbVersions = db.connect() transientsDbConn = dbConns["transients"] cataloguesDbConn = dbConns["catalogues"]
- update key arguments values and definitions with defaults - update return values and definitions - update usage examples and text - update docstring text - check sublime snippet exists - clip any useful text to docs mindmap - regenerate the docs and check redendering of this docstring
Methods
connect()connect to the various databases, the credientals and settings of which are found in the sherlock settings file
-
connect()[source] ∞ connect to the various databases, the credientals and settings of which are found in the sherlock settings file
Return
transientsDbConn– the database hosting the transient source datacataloguesDbConn– connection to the database hosting the contextual catalogues the transients are to be crossmatched against
See the class docstring for usage
- update key arguments values and definitions with defaults - update return values and definitions - update usage examples and text - update docstring text - check sublime snippet exists - clip any useful text to docs mindmap - regenerate the docs and check redendering of this docstring