Skip to content

Commit 7f4e887

Browse files
tiangolopatrick91
andauthored
➕ Add optional dependency on fastapi-cloud-cli (#181)
Co-authored-by: Patrick Arminio <[email protected]>
1 parent 0afc776 commit 7f4e887

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ classifiers = [
3232
"License :: OSI Approved :: MIT License",
3333
]
3434
dependencies = [
35-
"typer >= 0.12.3",
35+
"typer >= 0.15.1",
3636
"uvicorn[standard] >= 0.15.0",
37-
"rich-toolkit >= 0.11.1"
37+
"rich-toolkit >= 0.14.8",
3838
]
3939

4040
[project.optional-dependencies]
4141
standard = [
4242
"uvicorn[standard] >= 0.15.0",
43+
"fastapi-cloud-cli >= 0.1.1",
44+
]
45+
standard-no-fastapi-cloud-cli = [
46+
"uvicorn[standard] >= 0.15.0",
4347
]
4448

4549
[project.urls]

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-e .
1+
-e .[standard]
22

33
pytest >=4.4.0,<9.0.0
44
coverage[toml] >=6.2,<8.0

src/fastapi_cli/cli.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
uvicorn = None # type: ignore[assignment]
2626

2727

28+
try:
29+
from fastapi_cloud_cli.cli import (
30+
app as fastapi_cloud_cli,
31+
)
32+
33+
app.add_typer(fastapi_cloud_cli)
34+
except ImportError: # pragma: no cover
35+
pass
36+
37+
2838
def version_callback(value: bool) -> None:
2939
if value:
3040
print(f"FastAPI CLI version: [green]{__version__}[/green]")

0 commit comments

Comments
 (0)