Closed tiangolo closed 2 months ago
📝 Docs preview for commit 79621a3acefddaadbc6a9933338f52e0cdde1a82 at: https://28bb498b.fastapitiangolo.pages.dev
Hi! https://discuss.python.org/t/optional-dependency-groups-omitting-package-requirements/20833 brought me to here as I am researching how to split out some optional dependencies in a nice way.
I see that you have taken a custom approach, here is what I understand:
fastapi-slim
share the same codebase as fastapi
pip install fastapi
installs the extra optional dependencies while pip install fastapi-slim
doesn'tpip install fastapi[standard]
is equivalent to pip install fastapi[standard]
in terms of dependenciesI have a few questions:
pdm
, but I am surprised when I clone the repository and do pip install -e .
it also install the [standard] dependencies automatically, how does this work? I expect this is some "magic" that you add during build time only.This PR causes issues for library maintainers. See https://github.com/tiangolo/fastapi/discussions/11733
🔧 Add configs and setup for
fastapi-slim
including optional extrasfastapi-slim[standard]
, andfastapi
including by default the samestandard
extrasThe
fastapi
package now includes thestandard
default recommended packages, andfastapi-slim
comes without those recommended standard packages and with a group of optional dependenciesfastapi-slim[standard]
, equivalent tofastapi
, for those that want to opt out of those defaultstandard
packages.