first commit

This commit is contained in:
2025-09-23 22:58:29 -04:00
commit 38e48b0b83
14 changed files with 755 additions and 0 deletions

31
config.py Normal file
View File

@@ -0,0 +1,31 @@
import os
from dotenv import load_dotenv
load_dotenv()
class Settings:
# Database
DATABASE_URL: str = os.getenv("DATABASE_URL", "postgresql://username:password@localhost:5432/itdontfitgsapi")
# Security
SECRET_TOKEN: str = os.getenv("SECRET_TOKEN", "your_secret_token_here")
# Server
API_HOST: str = os.getenv("API_HOST", "0.0.0.0")
API_PORT: int = int(os.getenv("API_PORT", "8000"))
# Environment
ENVIRONMENT: str = os.getenv("ENVIRONMENT", "development")
DEBUG: bool = os.getenv("DEBUG", "true").lower() == "true"
# SSL
SSL_REDIRECT: bool = os.getenv("SSL_REDIRECT", "false").lower() == "true"
# Logging
LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO")
@property
def is_production(self) -> bool:
return self.ENVIRONMENT.lower() == "production"
settings = Settings()