This commit implements a complete migration from JSON-based configuration to .env environment variables, providing better security and flexibility. Key Changes: - Add python-dotenv dependency for environment variable support - Create config/env_loader.py with type conversion utilities - Add from_env() class methods to all config dataclasses - Update ConfigLoader to prioritize environment variables - Add save_to_env() method for .env file management - Implement database connection factory pattern - Add base DAO and connection classes for better abstraction - Support both SQL Server and MySQL with unified interface - Create migration script (scripts/migrate_to_env.py) - Update GUI to read/write .env files - Add comprehensive migration documentation New Files: - config/env_loader.py - Environment variable loader - db/base_connection.py - Base database connection interface - db/base_dao.py - Base DAO with common utilities - db/connection_factory.py - Factory for creating connections - db/mysql_connection.py - MySQL-specific connection - db/sqlserver_connection.py - SQL Server-specific connection - db/table_name_converter.py - SQL dialect converter - scripts/migrate_to_env.py - Configuration migration tool - docs/ENV_MIGRATION.md - Complete migration guide - .env.example - Environment variable template Testing: - Verified MySQL connection (8.0.44) - Tested all DAO operations - Confirmed 150 tables accessible - Validated configuration loading Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
22 lines
409 B
Plaintext
22 lines
409 B
Plaintext
# ===========================
|
|
# Playwright Python Automation
|
|
# ===========================
|
|
# Python 3.8+ required
|
|
|
|
# --- Browser Automation ---
|
|
playwright==1.57.0
|
|
|
|
# --- Database ---
|
|
pyodbc>=5.0.0
|
|
mysql-connector-python>=8.0.0
|
|
|
|
# --- Excel/Data Processing ---
|
|
pandas>=2.0.0
|
|
openpyxl>=3.1.0
|
|
numpy>=1.24.0
|
|
|
|
# --- System Utilities (installed via pip) ---
|
|
python-dateutil>=2.8.0
|
|
pytz>=2023.0
|
|
python-dotenv>=1.0.0
|