Skip to main content

Posts

Showing posts with the label Web API

How to deploy FastAPI on Google Cloud Run

   Introduction Learn how to deploy a FastAPI application using Docker and Google Cloud Run — step-by-step from writing the app, building the container, pushing it, and running it in Cloud Run. Deploying modern Python web APIs has become easier than ever thanks to frameworks like FastAPI and serverless container platforms like Google Cloud Run. In this post we walk through how to build a FastAPI application, wrap it in a Docker container, push it to Google’s container registry, and deploy to Cloud Run. We’ll use a reference article as a base structure.  By the end of this tutorial you’ll have a running FastAPI service accessible on the web, and you’ll understand how the pieces fit together. Why use FastAPI and Cloud Run? FastAPI – modern, fast, Python-based FastAPI allows you to build APIs with very good performance, automatic interactive docs (OpenAPI/Swagger) and type hints. It’s increasingly popular for production-quality APIs in Python. For example, you m...