project-init

This commit is contained in:
srikar committed 2026-09-25 08:14:04 -07:00
commit 65691a0aee
7 files changed
+897

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
"""
Configuration for the Student Management System.
Connection settings are read from environment variables first, falling back
to the defaults below (which match the assignment's requirements). This
means you can run the app as-is, or override any value like:
DB_HOST=10.0.1.40 DB_USER=root DB_PASSWORD=secret python3 main.py
"""
import os
DB_HOST = os.environ.get("DB_HOST", "10.0.1.40")
DB_PORT = int(os.environ.get("DB_PORT", "3306"))
DB_USER = os.environ.get("DB_USER", "root")
DB_PASSWORD = os.environ.get("DB_PASSWORD", "")
DB_NAME = os.environ.get("DB_NAME", "student_db")
DB_CONNECT_TIMEOUT = int(os.environ.get("DB_CONNECT_TIMEOUT", "10"))