| import pymysql | |
| DB_CONFIG = { | |
| 'host': '49.233.215.144', | |
| 'port': 3306, | |
| 'user': 'sy', | |
| 'password': 'sy_password', | |
| 'database': 'pt_station', | |
| 'charset': 'utf8mb4', | |
| 'cursorclass': pymysql.cursors.DictCursor | |
| } | |
| def get_db_connection(): | |
| return pymysql.connect(**DB_CONFIG) |