add all project files
This commit is contained in:
17
back/database.py
Normal file
17
back/database.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from secret import host, user, password, database
|
||||
|
||||
import pymysql.cursors
|
||||
|
||||
connection = pymysql.connect(
|
||||
host=host,
|
||||
user=user,
|
||||
password=password,
|
||||
database=database,
|
||||
charset='utf8mb4',
|
||||
cursorclass=pymysql.cursors.DictCursor
|
||||
)
|
||||
|
||||
cursor = connection.cursor()
|
||||
# cursor.execute(sql, ())
|
||||
# cursor.fetchall()
|
||||
# connection.commit()
|
||||
Reference in New Issue
Block a user