wip
This commit is contained in:
parent
c238b9d757
commit
fcc0698aeb
12 changed files with 95 additions and 97 deletions
|
|
@ -2,7 +2,7 @@ import typer
|
|||
import uvicorn
|
||||
|
||||
from learn_sql_model.cli.common import verbose_callback
|
||||
from learn_sql_model.config import config
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
api_app = typer.Typer()
|
||||
|
||||
|
|
@ -26,4 +26,4 @@ def run(
|
|||
help="show the log messages",
|
||||
),
|
||||
):
|
||||
uvicorn.run("learn_sql_model.api.app:app", port=config.port, log_level="info")
|
||||
uvicorn.run("learn_sql_model.api.app:app", port=get_config().port, log_level="info")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from rich.console import Console
|
|||
import typer
|
||||
|
||||
from learn_sql_model.cli.common import verbose_callback
|
||||
from learn_sql_model.config import config as configuration
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
config_app = typer.Typer()
|
||||
|
||||
|
|
@ -26,4 +26,4 @@ def show(
|
|||
help="show the log messages",
|
||||
),
|
||||
):
|
||||
Console().print(configuration)
|
||||
Console().print(get_config())
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ def hero():
|
|||
@hero_app.command()
|
||||
def get(id: int = None) -> Union[Hero, List[Hero]]:
|
||||
"get one hero"
|
||||
hero = Hero.get(item_id=id)
|
||||
hero = Hero().get(item_id=id)
|
||||
Console().print(hero)
|
||||
return hero
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue