diff --git a/learn_sql_model/config.py b/learn_sql_model/config.py index 46d6eaa..73888bd 100644 --- a/learn_sql_model/config.py +++ b/learn_sql_model/config.py @@ -7,6 +7,7 @@ from sqlalchemy import create_engine from sqlmodel import SQLModel, Session from learn_sql_model.standard_config import load +from rich.console import Console if TYPE_CHECKING: from sqlalchemy import Engine @@ -17,6 +18,7 @@ class ApiServer(BaseModel): port: int = 5000 reload: bool = True log_level: str = "info" + host: str = "0.0.0.0" class Database: @@ -90,4 +92,5 @@ def get_db(config: Config = None, reset_db_state=Depends(reset_db_state)): def get_config(overrides: dict = {}) -> Config: raw_config = load("learn_sql_model") config = Config(**raw_config, **overrides) + Console().print('starting learn-sql-model api with config:', config) return config