Files
fastapi/fastapi/cli.py
T
dependabot[bot]andYurii Motov ad263df5a4 ⬆ Bump the python-packages group across 1 directory with 15 updates (#16285)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
2026-09-01 22:59:50 +02:00

14 lines
454 B
Python

try:
from fastapi_cli.cli import main as cli_main
except ImportError: # pragma: no cover
cli_main = None # type: ignore # ty: ignore[unused-ignore-comment]
def main() -> None:
if not cli_main: # type: ignore[truthy-function]
message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
print(message)
raise RuntimeError(message) # noqa: B904
cli_main()