How to Connect a FastAPI Server to PostgreSQL and Deploy on GCP Cloud Run

This page summarizes the projects mentioned and recommended in the original post on dev.to

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com
featured
InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
  • OpenAPI-Specification

    The OpenAPI Specification Repository

    Since FastAPI is based on OpenAPI, at this point you can also use the automatically generated docs. There are multiple options, and two are included by default. Try them out by accessing the following URLs:

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • PostgreSQL

    Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch

    Building a web application involves more than just a web server; it requires a reliable and efficient database to store and manage the application's stateful data. Among the various database options available, PostgreSQL stands out as a popular choice for developers. Its extensive community and ecosystem provide invaluable support, making it easier to solve problems. PostgreSQL's reputation for reliability and stability further solidifies its position as a trusted solution. Additionally, PostgreSQL's compatibility with multiple platforms ensures flexibility in deployment. In this blog post, we will explore how to connect our FastAPI server with a PostgreSQL database. It's worth noting that the guide can be easily adapted for other databases like MySQL or MongoDB with minimal modifications.

  • swagger-ui

    Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

    SwaggerUI: http://localhost:8080/docs

  • tortoise-orm

    Familiar asyncio ORM for python, built with relations in mind

    To do this, we can use the Tortoise-ORM. Begin by installing the package:

  • redoc

    📘 OpenAPI/Swagger-generated API Reference Documentation

    Redoc: http://localhost:8080/redoc

  • fastapi-postgres-gcp-blog

    Source code for a guide on deploying a FastAPI application with a PostgreSQL database to GCP

    You can find all the source code here: https://github.com/GlennViroux/fastapi-postgres-gcp-blog

  • fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

    When I was building Ballistic, I chose for FastAPI as the web framework for my backend API in Python, since it had gained significant popularity in the Python community in a very short amount of time. Apart from its performance, powered by the usage of the asyncio library, I was convinced by the core integration of type annotations and the well-built documentation. Take into account that good documentation and a broad community can save you tons of time when developing your backend.

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Simplifying Angular Development with Swagger: A Step-by-Step Guide

    3 projects | dev.to | 11 Apr 2024
  • Best Software Documentation Tools

    4 projects | dev.to | 5 Feb 2024
  • The Best API Documentation Tools for Dev Teams in 2023

    5 projects | dev.to | 28 Mar 2023
  • Why not OpenAPITools?

    3 projects | /r/golang | 9 Feb 2023
  • Alguma alma caridosa UI/UX dev, para um serviço púbico gratuito, livre e de código aberto?

    6 projects | /r/portugal | 16 Dec 2022