Skip to content

Supporting running FastAPI apps via Uvicorn in Python runtimes#2254

Open
cormacpayne wants to merge 3 commits intomainfrom
corm/support-fast-api
Open

Supporting running FastAPI apps via Uvicorn in Python runtimes#2254
cormacpayne wants to merge 3 commits intomainfrom
corm/support-fast-api

Conversation

@cormacpayne
Copy link
Contributor

This PR adds support for detecting and running applications targeting the FastAPI Python framework. Rather than using the traditional Gunicorn server for running the application, we are now supporting Uvicorn as the server of choice for FastAPI applications.

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>.
  • Tests are included and/or updated for code changes.
  • Proper license headers are included in each file.

@cormacpayne cormacpayne requested a review from a team as a code owner November 13, 2023 21:17
RUN ${IMAGES_DIR}/runtime/python/install-dependencies.sh
RUN pip install --upgrade pip \
&& pip install gunicorn \
&& pip install uvicorn \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I don't think we can add these for the existing images as it can have some implications in terms of size and side-effects for existing customers.
The easiest ways I would see is:

  • Waiting for a new Python version and only enable this here.
  • Create a new image just for this case, which is a bit annoying as well.
    We can sync offline if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants