Skip to content

Add Support for FastAPI #159

@ZeroCool2u

Description

@ZeroCool2u

Can we add FastAPI support in the same way that Flask is supported? We really don't use Flask, because FastAPI is so much easier, even compared to Flask-RESTX, etc, and converting all our API's over to an entire other framework really isn't an option. Obviously this limits the usefulness of R Studio Connect.

I'm not sure how R Studio Connect runs a Flask app under the hood, but running a FastAPI instance is almost identical to running a Flask instance with gunicorn, so maybe this is actually pretty easy? Here are two commands that are effectively equivalent for running FastAPI normally and running it with gunicorn.

Is this an option? This would be incredibly helpful.

uvicorn main:app --host super_server.theolinnemann.com --port 8080
gunicorn main:app -b super_server.theolinnemann.com:8080 -k uvicorn.workers.UvicornWorker

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions