Spaces:
Sleeping
Sleeping
Create core/config.py
Browse files- core/config.py +25 -0
core/config.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# core/config.py
|
2 |
+
|
3 |
+
# -*- coding: utf-8 -*-
|
4 |
+
#
|
5 |
+
# PROJECT: CognitiveEDA v5.0 - The QuantumLeap Intelligence Platform
|
6 |
+
#
|
7 |
+
# DESCRIPTION: Centralized, environment-aware configuration management using
|
8 |
+
# Pydantic for robust validation and type safety.
|
9 |
+
|
10 |
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
11 |
+
|
12 |
+
class AppConfig(BaseSettings):
|
13 |
+
"""
|
14 |
+
Application configuration model. Loads settings from a .env file.
|
15 |
+
"""
|
16 |
+
APP_TITLE: str = "🚀 CognitiveEDA v5.0: The QuantumLeap Intelligence Platform"
|
17 |
+
GEMINI_MODEL: str = 'gemini-1.5-flash-latest'
|
18 |
+
MAX_UI_ROWS: int = 50_000
|
19 |
+
GOOGLE_API_KEY: str
|
20 |
+
|
21 |
+
# Pydantic settings configuration
|
22 |
+
model_config = SettingsConfigDict(env_file='.env', env_file_encoding='utf-8', extra='ignore')
|
23 |
+
|
24 |
+
# Instantiate the configuration object to be imported by other modules
|
25 |
+
settings = AppConfig()
|