-
Couldn't load subscription status.
- Fork 179
Description
Is your feature request related to a problem? Please describe.
We use fastapi_utils.InferringRouter on a lot of projects to enable more natural use of type annotations within FastAPI. On some of these projects, there is no database usage at all or even a different database type all together, such as MongoDB.
We'd like to avoid the need of installing sqlalchemy (and its dependency greenlet) in these situations, which makes the Docker images larger and is one more package we need to track for updates and audit.
Describe the solution you'd like
Be able to install fastapi-utils in two ways:
$ pip install fastapi-utils
# This depends only on fastapi and pydantic$ pip install fastapi[sqlalchemy]
# This additionally installs the extra-requires sqlalchemyAdditional context
In Poetry, use the extras keyword to accomplish this: https://python-poetry.org/docs/pyproject/#extras
Setuptools docs on optional dependencies: https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html#optional-dependencies