This commit is contained in:
Waylon Walker 2023-06-20 12:28:25 -05:00
parent 78cc5ff0cd
commit 70f4a89e30
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
10 changed files with 564 additions and 182 deletions

View file

@ -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