added full project files

This commit is contained in:
2025-11-25 13:33:49 +05:30
parent 211a0a970e
commit 9b71ab6716
538 changed files with 17470 additions and 0 deletions

18
config.py Normal file
View File

@@ -0,0 +1,18 @@
import mysql.connector
import os
# Get MySQL credentials from environment variables
MYSQL_HOST = os.getenv("MYSQL_HOST", "127.0.0.1")
MYSQL_USER = os.getenv("MYSQL_USER", "root")
MYSQL_PASSWORD = os.getenv("MYSQL_PASSWORD", "tiger")
MYSQL_DB = os.getenv("MYSQL_DB", "test")
# Connect to MySQL
def get_db_connection():
return mysql.connector.connect(
host=MYSQL_HOST,
user=MYSQL_USER,
password=MYSQL_PASSWORD,
database=MYSQL_DB
)