wip
This commit is contained in:
parent
78cc5ff0cd
commit
70f4a89e30
10 changed files with 564 additions and 182 deletions
|
|
@ -6,7 +6,6 @@ from rich.console import Console
|
|||
import typer
|
||||
|
||||
from learn_sql_model.config import get_config
|
||||
from learn_sql_model.factories.hero import HeroFactory
|
||||
from learn_sql_model.models.hero import (
|
||||
Hero,
|
||||
HeroCreate,
|
||||
|
|
@ -15,6 +14,13 @@ from learn_sql_model.models.hero import (
|
|||
HeroUpdate,
|
||||
Heros,
|
||||
)
|
||||
from learn_sql_model.optional import _optional_import_
|
||||
|
||||
HeroFactory = _optional_import_(
|
||||
"learn_sql_model.factories.hero",
|
||||
"HeroFactory",
|
||||
group="api",
|
||||
)
|
||||
|
||||
hero_app = typer.Typer()
|
||||
|
||||
|
|
@ -46,7 +52,7 @@ def list(
|
|||
) -> Union[Hero, List[Hero]]:
|
||||
"list many heros"
|
||||
heros = Heros.list(where=where, offset=offset, limit=limit)
|
||||
Console().print(heros)
|
||||
Console().print(hero)
|
||||
return hero
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue