50 lines
1.1 KiB
Python
50 lines
1.1 KiB
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env", env_file_encoding="utf-8", case_sensitive=False, extra="ignore"
|
|
)
|
|
|
|
jwt_secret: str
|
|
jwt_algorithm: str
|
|
access_token_expire_minutes: int
|
|
refresh_token_expire_days: int
|
|
|
|
SAGE_TYPE_DEVIS: int = 0
|
|
SAGE_TYPE_BON_COMMANDE: int = 10
|
|
SAGE_TYPE_PREPARATION: int = 20
|
|
SAGE_TYPE_BON_LIVRAISON: int = 30
|
|
SAGE_TYPE_BON_RETOUR: int = 40
|
|
SAGE_TYPE_BON_AVOIR: int = 50
|
|
SAGE_TYPE_FACTURE: int = 60
|
|
|
|
sage_gateway_url: str
|
|
sage_gateway_token: str
|
|
frontend_url: str
|
|
|
|
database_url: str = "sqlite+aiosqlite:///./data/sage_dataven.db"
|
|
|
|
smtp_host: str
|
|
smtp_port: int = 587
|
|
smtp_user: str
|
|
smtp_password: str
|
|
smtp_from: str
|
|
smtp_use_tls: bool = True
|
|
|
|
universign_api_key: str
|
|
universign_api_url: str
|
|
|
|
api_host: str
|
|
api_port: int
|
|
api_reload: bool = False
|
|
|
|
max_email_workers: int = 3
|
|
max_retry_attempts: int = 3
|
|
retry_delay_seconds: int = 3
|
|
|
|
cors_origins: List[str] = ["*"]
|
|
|
|
|
|
settings = Settings()
|