]> git.datanom.net - pwp.git/blob - app/DB/mysqld.py
Half way through migration away from sqlalchemy
[pwp.git] / app / DB / mysqld.py
1 import mysql.connector as mysql
2 from base import Base
3
4 class Mysql(Base):
5 def __init__(self, database, user, password, host, port):
6 if port is None:
7 port = 3306
8 try:
9 self.conn = mysql.connect(database=database, user=user, password=password, host=host, port=port)
10 except mysql.Error as e:
11 raise Exception(e)
This page took 0.090174 seconds and 6 git commands to generate.