mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-05 07:34:12 -04:00
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
14 lines
455 B
Python
14 lines
455 B
Python
try:
|
|
from fastapi_cli.cli import main as cli_main
|
|
|
|
except ImportError: # pragma: no cover
|
|
cli_main = None # type: ignore
|
|
|
|
|
|
def main() -> None:
|
|
if not cli_main: # type: ignore[truthy-function] # ty: ignore[unused-ignore-comment]
|
|
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()
|