mirror of
https://github.com/Alexander-D-Karpov/akarpov
synced 2024-11-15 00:56:34 +03:00
20 lines
443 B
Python
20 lines
443 B
Python
|
from pydantic_settings import BaseSettings
|
||
|
|
||
|
|
||
|
class AppSettings(BaseSettings):
|
||
|
"""General configuration of the app."""
|
||
|
|
||
|
redirect_slug_cutoff: int = 3
|
||
|
|
||
|
relative_base: str = "http://127.0.0.1:8000"
|
||
|
database_url: str = "postgresql://postgres:postgres@127.0.0.1:5432/akarpov"
|
||
|
|
||
|
class Config:
|
||
|
env_prefix = ""
|
||
|
env_file = ".env"
|
||
|
env_file_encoding = "utf-8"
|
||
|
extra = "allow"
|
||
|
|
||
|
|
||
|
settings = AppSettings()
|