ramp_database.utils.setup_db

ramp_database.utils.setup_db(config)

Create a sqlalchemy engine and session to interact with the database.

Parameters
configdict

Configuration file containing the information to connect to the dataset. If you are using the configuration provided by ramp, it corresponds to the the sqlalchemy key.

Returns
dbsqlalchemy.Engine

The engine to connect to the database.

Sessionsqlalchemy.orm.Session

Configured Session class which can later be used to communicate with the database.