mirror of
https://github.com/ijaric/voice_assistant.git
synced 2025-05-24 14:33:26 +00:00
[#10] fix move ApiSettings
This commit is contained in:
parent
edcc3a6e01
commit
fca4d23f05
|
@ -1,11 +1,12 @@
|
|||
from .api import *
|
||||
from .logger import *
|
||||
from .postgres import *
|
||||
from .project import *
|
||||
|
||||
__all__ = [
|
||||
"ApiSettings",
|
||||
"LoggingSettings",
|
||||
"get_logging_config",
|
||||
"PostgresSettings",
|
||||
"ApiSettings",
|
||||
"ProjectSettings",
|
||||
]
|
||||
|
|
15
src/fastapi_app/lib/app/split_settings/api.py
Normal file
15
src/fastapi_app/lib/app/split_settings/api.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import pydantic_settings
|
||||
|
||||
import lib.app.split_settings.utils as app_split_settings_utils
|
||||
|
||||
|
||||
class ApiSettings(pydantic_settings.BaseSettings):
|
||||
model_config = pydantic_settings.SettingsConfigDict(
|
||||
env_file=app_split_settings_utils.ENV_PATH,
|
||||
env_prefix="SERVER_",
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
host: str = "0.0.0.0"
|
||||
port: int = 8000
|
|
@ -4,18 +4,6 @@ import pydantic_settings
|
|||
import lib.app.split_settings.utils as app_split_settings_utils
|
||||
|
||||
|
||||
class ApiSettings(pydantic_settings.BaseSettings):
|
||||
model_config = pydantic_settings.SettingsConfigDict(
|
||||
env_file=app_split_settings_utils.ENV_PATH,
|
||||
env_prefix="SERVER_",
|
||||
env_file_encoding="utf-8",
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
host: str = "0.0.0.0"
|
||||
port: int = 8000
|
||||
|
||||
|
||||
class ProjectSettings(pydantic_settings.BaseSettings):
|
||||
model_config = pydantic_settings.SettingsConfigDict(
|
||||
env_file=app_split_settings_utils.ENV_PATH,
|
||||
|
|
Loading…
Reference in New Issue
Block a user