add trogon
This commit is contained in:
parent
00eed9f0cf
commit
fb8c507f4c
2 changed files with 6 additions and 16 deletions
|
|
@ -1,7 +1,8 @@
|
|||
from trogon import Trogon
|
||||
import typer
|
||||
from typer.main import get_group
|
||||
|
||||
from learn_sql_model.cli.api import api_app
|
||||
from learn_sql_model.cli.common import verbose_callback
|
||||
from learn_sql_model.cli.config import config_app
|
||||
from learn_sql_model.cli.hero import hero_app
|
||||
from learn_sql_model.cli.model import model_app
|
||||
|
|
@ -37,21 +38,9 @@ def version_callback(value: bool) -> None:
|
|||
raise typer.Exit()
|
||||
|
||||
|
||||
@app.callback()
|
||||
def main(
|
||||
version: bool = typer.Option(
|
||||
None,
|
||||
"--version",
|
||||
callback=version_callback,
|
||||
is_eager=True,
|
||||
),
|
||||
verbose: bool = typer.Option(
|
||||
False,
|
||||
callback=verbose_callback,
|
||||
help="show the log messages",
|
||||
),
|
||||
) -> None:
|
||||
return
|
||||
@app.command()
|
||||
def tui(ctx: typer.Context) -> None:
|
||||
Trogon(get_group(app), click_context=ctx).run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ classifiers = [
|
|||
]
|
||||
dependencies = [
|
||||
"anyconfig",
|
||||
"trogon",
|
||||
"fastapi",
|
||||
"httpx",
|
||||
"passlib[bcrypt]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue