Skip to content

Commit a45679f

Browse files
βž• Add fastapi-new in new optional dependency group (#241)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 678c50d commit a45679f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

β€Žpyproject.tomlβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ standard = [
4747
standard-no-fastapi-cloud-cli = [
4848
"uvicorn[standard] >= 0.15.0",
4949
]
50+
new = [
51+
"fastapi-new >= 0.0.2 ; python_version >= '3.10'",
52+
]
5053

5154
[project.urls]
5255
Homepage = "https://github.com/fastapi/fastapi-cli"

β€Žsrc/fastapi_cli/cli.pyβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
pass
4040

4141

42+
try:
43+
from fastapi_new.cli import ( # type: ignore[import-not-found]
44+
app as fastapi_new_cli,
45+
)
46+
47+
app.add_typer(fastapi_new_cli) # pragma: no cover
48+
except ImportError: # pragma: no cover
49+
pass
50+
51+
4252
def version_callback(value: bool) -> None:
4353
if value:
4454
print(f"FastAPI CLI version: [green]{__version__}[/green]")

0 commit comments

Comments
Β (0)