hisham-cmd commited on
Commit
0f64da2
·
verified ·
1 Parent(s): fb11809

Upload app/core/config.py

Browse files
Files changed (1) hide show
  1. app/core/config.py +26 -0
app/core/config.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic_settings import BaseSettings
2
+ from typing import List
3
+
4
+
5
+ class Settings(BaseSettings):
6
+ DATABASE_URL: str = "sqlite:///./vortex.db"
7
+ JWT_SECRET: str = "change-me-in-production"
8
+ JWT_ALGORITHM: str = "HS256"
9
+ ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
10
+ REFRESH_TOKEN_EXPIRE_DAYS: int = 7
11
+ GOOGLE_CLIENT_ID: str = ""
12
+ GOOGLE_CLIENT_SECRET: str = ""
13
+ CORS_ORIGINS: str = "http://localhost:3000"
14
+
15
+ @property
16
+ def cors_origins_list(self) -> List[str]:
17
+ return [origin.strip() for origin in self.CORS_ORIGINS.split(",")]
18
+
19
+ model_config = {
20
+ "env_file": ".env",
21
+ "env_file_encoding": "utf-8",
22
+ "extra": "ignore",
23
+ }
24
+
25
+
26
+ settings = Settings()