-
First Check
Commit to Help
Example CodeNo code needed. DescriptionHi, First of all, thanks for your effort in maintaining fastapi, it is much appreciated. The 0.111.0 release added a new feature, Whilst there is the We believe the best solution here would be to have the cli be an extra. Given the cli is its own package anyway, having this be an extra (maybe under We would therefore be greatful is the change making installing the CLI as a default be reverted and added as an opt-in extra. Thanks Operating SystemmacOS Operating System DetailsNo response FastAPI Version0.111.0 Pydantic Version2.7.1 Python Version3.12.1 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 20 replies
-
What I got after upgrading fastapi: httptools I think that installing a half of pypi is too much for useless feature, isn't it? |
Beta Was this translation helpful? Give feedback.
-
Another reason: the |
Beta Was this translation helpful? Give feedback.
-
Why couldn't a new |
Beta Was this translation helpful? Give feedback.
-
We encountered same issue with version 0.111.0 when building fastapi from windows wheels. As the optional dependencies [standard] is instructed to be installed by default for both fastapi and fastapi-cli, this creates a Cyclic dependencies. I understand the fastapi is required for fastapi-cli, but not necessarily vice versa. Could we resolve this cyclic dependencies issue please? Steps to reproduce: $ pipdeptree --warn=fail
httptools==0.6.1 |
Beta Was this translation helpful? Give feedback.
-
I don't think there's a need for slim or similar. Simply fastapi should not depend on fastapi-cli. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback! So, the idea with having the new setup with For a newbie, Meanwhile, for any advanced developer (if you are here reading this you are advanced), if you want to trim some of the default extras, it should be a relatively simple process of installing For example I imagine you would manually add |
Beta Was this translation helpful? Give feedback.
-
Apart from the reason to have a The first question I have would be, why do you need that package instead of using FastAPI directly? I imagine it's because of some of the features/characteristics, but I think there's an official way to achieve each one with pure FastAPI... or maybe I'm missing the point in some of those. Which specific features do you need from that package that you can't do with FastAPI, and why are those features useful? |
Beta Was this translation helpful? Give feedback.
-
Another seemingly unintended consequence of this: corruption of the virtualenv when switching between fastapi and fastapi-slim via a git checkout or stash. It's caused because both Recreation:
Second PDM Output:
|
Beta Was this translation helpful? Give feedback.
-
Upon upgrading FastAPI to 0.111.0, we started randomly getting errors:
It turns out this is caused by
So the default inclusion of Thank you very much for your work in developing this very fantastic project. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback everyone! As having So, to get the standard optional dependencies people now have to install it with: pip install "fastapi[standard]" Note: remember to use the quotes, depending on your terminal that might be required. Having the optional extra, square brackets, quotes, is not as nice as just This is available in FastAPI version 0.112.0. 🎉 |
Beta Was this translation helpful? Give feedback.
Thanks for the feedback everyone!
As having
fastapi
include by default the standard dependencies has been inconvenient to several people, I decided to make those standard dependencies an optional extra groupstandard
.So, to get the standard optional dependencies people now have to install it with:
pip install "fastapi[standard]"
Note: remember to use the quotes, depending on your terminal that might be required.
Having the optional extra, square brackets, quotes, is not as nice as just
fastapi
, it's extra things to have in mind, and extra things for newcomers to learn from the beginning. But anyway, it seems that having the default standard dependencies installed by default, and having t…