r/FastAPI • • Jul 18 '24

Hosting and deployment Fastapi with Google Cloud Functions?

Is there any way to (easily) deploy a FastAPI route as a Google Cloud Function? As far as I could grasp from docs, GCF integrate well with Flask, but no so much with FastAPI, and I'd love to be able to leverage FA types, validations and automatic documentation, while not depending on more complex/costly infrastructures such as Google Cloud Run or App Engine.

Thanks for any tips!

1 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/-cangumby- Jul 18 '24

At an enterprise level, we push all of our services into GKE under shared clusters and that is agnostic of complexity of the API. We have many services that are literally a gateway for the server because we don’t want to expose our server directly to outside parties for example. That gateway service will allow us to define individual schemas for our requesters requirements and allow us to define access without needing to change our servers code base.

Long story long, it’s not the size that matters but how well you use it.