-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
40 lines (29 loc) · 1016 Bytes
/
config.py
File metadata and controls
40 lines (29 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from pydantic import SecretStr
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
model_config = SettingsConfigDict(
env_file=".env",
env_file_encoding="utf-8",
extra="ignore"
)
database_url: str
secret_key: SecretStr
algorithm: str = "HS256"
access_token_expire_minutes: int = 30
# S3 Configuration
s3_bucket_name: str
s3_region: str = "eu-north-1"
s3_access_key_id: SecretStr | None = None
s3_secret_access_key: SecretStr | None = None
s3_endpoint_url: str | None = None
max_upload_size_bytes: int = 5 * 1024 * 1024
posts_per_page: int = 10
reset_token_expire_minutes: int = 60
mail_server: str = "localhost"
mail_port: int = 587
mail_username: str = ""
mail_password: SecretStr = SecretStr("")
mail_from: str = "noreply@example.com"
mail_use_tls: bool = True
frontend_url: str = "http://localhost:8000"
settings = Settings() # Loaded from .env file