You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
451 B
20 lines
451 B
from pydantic_settings import BaseSettings
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
class UvicornSettings(BaseModel):
|
|
host: str = "0.0.0.0"
|
|
port: int = 8000
|
|
reload: bool = True
|
|
|
|
class DatabaseSettings(BaseModel):
|
|
url: str = "aiosqlite:///easy_db.db"
|
|
|
|
class Settings(BaseSettings):
|
|
database: DatabaseSettings = DatabaseSettings()
|
|
uvicorn: UvicornSettings = UvicornSettings()
|
|
class Config:
|
|
env_nested_delimiter = '__'
|
|
|
|
|