Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Must install fastapi with the standard extra since fastapi version 0.112.0 #23

Closed
Actionb opened this issue Sep 17, 2024 · 1 comment · Fixed by #24
Closed

Must install fastapi with the standard extra since fastapi version 0.112.0 #23

Actionb opened this issue Sep 17, 2024 · 1 comment · Fixed by #24
Labels
good first issue Good for newcomers

Comments

@Actionb
Copy link
Contributor

Actionb commented Sep 17, 2024

Hi there, thanks for the helpful examples! However, I ran into a small issue: using run.sh without any arguments produces an error:

$ ./run.sh

To use the fastapi command, please install "fastapi[standard]":

	pip install "fastapi[standard]"

Traceback (most recent call last):
  File "/app/.venv/bin/fastapi", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/fastapi/cli.py", line 12, in main
    raise RuntimeError(message)  # noqa: B904
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: To use the fastapi command, please install "fastapi[standard]":

	pip install "fastapi[standard]"

Since fastapi 0.112.0, fastapi-cli is no longer included by default and must be installed using the standard extra. For example:

# pyproject.toml
[project]
name = "uv-docker-example"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
    "fastapi[standard]>=0.112.2",
]
@zanieb
Copy link
Member

zanieb commented Sep 18, 2024

Thanks! Pull request welcome here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants