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
|
import typer
|
||||||
|
from typer.main import get_group
|
||||||
|
|
||||||
from learn_sql_model.cli.api import api_app
|
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.config import config_app
|
||||||
from learn_sql_model.cli.hero import hero_app
|
from learn_sql_model.cli.hero import hero_app
|
||||||
from learn_sql_model.cli.model import model_app
|
from learn_sql_model.cli.model import model_app
|
||||||
|
|
@ -37,21 +38,9 @@ def version_callback(value: bool) -> None:
|
||||||
raise typer.Exit()
|
raise typer.Exit()
|
||||||
|
|
||||||
|
|
||||||
@app.callback()
|
@app.command()
|
||||||
def main(
|
def tui(ctx: typer.Context) -> None:
|
||||||
version: bool = typer.Option(
|
Trogon(get_group(app), click_context=ctx).run()
|
||||||
None,
|
|
||||||
"--version",
|
|
||||||
callback=version_callback,
|
|
||||||
is_eager=True,
|
|
||||||
),
|
|
||||||
verbose: bool = typer.Option(
|
|
||||||
False,
|
|
||||||
callback=verbose_callback,
|
|
||||||
help="show the log messages",
|
|
||||||
),
|
|
||||||
) -> None:
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyconfig",
|
"anyconfig",
|
||||||
|
"trogon",
|
||||||
"fastapi",
|
"fastapi",
|
||||||
"httpx",
|
"httpx",
|
||||||
"passlib[bcrypt]",
|
"passlib[bcrypt]",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue