setup_database_connection (function)¶
- fundamentals.mysql.setup_database_connection(pathToYamlFile)[source][source]¶
Start a database connection using settings in yaml file
Given the location of a YAML dictionary containing database credientials, this function will setup and return the connection*
Key Arguments
pathToYamlFile– path to the YAML dictionary.
Return
dbConn– connection to the MySQL database.
Usage
The settings file should be in this form, with all keyword values set:
`yaml db: unit_tests host: localhost user: utuser password: utpass `And here’s how to generate the connection object:
```python from fundamentals.mysql import setup_database_connection dbConn = setup_database_connection(
pathToYamlFile=pathToMyYamlFile
)¶