REST API with FastAPI and PostgreSQL

Overview

REST API with FastAPI and PostgreSQL

To have the same data in db:

create table CLIENT_DATA (id SERIAL PRIMARY KEY, fullname VARCHAR(50) NOT NULL,email VARCHAR(50) NOT NULL,gender VARCHAR(50) NOT NULL, credit_card VARCHAR(50) NOT NULL,credit_type VARCHAR(50) NOT NULL);

insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Christen Klus', '[email protected]', 'Female', '3552231300758866', 'jcb');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Swen Cromar', '[email protected]', 'Female', '5602240066702948', 'bankcard');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Kurtis Noblett', '[email protected]', 'Genderfluid', '4903163479056604', 'switch');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Barri Rappport', '[email protected]', 'Bigender', '502037203744396450', 'maestro');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Corri Walling', '[email protected]', 'Female', '4903465187953065640', 'switch');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Eugenius Zanetto', '[email protected]', 'Agender', '30262573266129', 'diners-club-carte-blanche');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Gram Dorian', '[email protected]', 'Male', '4917468581803114', 'visa-electron');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Mischa Brazil', '[email protected]', 'Genderqueer', '3562803087558541', 'jcb');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Maiga Baff', '[email protected]', 'Polygender', '5458034263519089', 'mastercard');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Arlana Tarpey', '[email protected]', 'Genderfluid', '5002351203212588', 'mastercard');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Ardelle Clayworth', '[email protected]', 'Non-binary', '6394721378052718', 'instapayment');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Eberhard Wastall', '[email protected]', 'Polygender', '4017956448658', 'visa');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Auberon Dwelly', '[email protected]', 'Female', '5436631296550515', 'diners-club-us-ca');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Aurel MacGillacolm', '[email protected]', 'Genderfluid', '3587898124463706', 'jcb');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Franciska Dunsmuir', '[email protected]', 'Genderqueer', '372301985423757', 'americanexpress');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Suellen Martelet', '[email protected]', 'Male', '5610870243652280490', 'china-unionpay');
insert into CLIENT_DATA (fullname, email, gender, credit_card, credit_type) values ('Bonita Fagence', 'bfa[email protected]', 'Genderqueer', '3564520281580984', 'jcb');

Data generated from mockaroo.com.


postgresql


To install all dependencies, in ./src/:

pip install -r requirements.txt

To test it, in the same folder:

uvicorn main:app --reload

Screenshots

GET

getall

getone

POST

post

PUT

put

DELETE

delete

Source code

REST-API-with-Fast-API-and-Postgre-SQL

Owner
Luis Quiñones Requelme
Backend Developer. Discord: luisn_anutshell#9481
Luis Quiñones Requelme
A Python framework to build Slack apps in a flash with the latest platform features.

Bolt for Python A Python framework to build Slack apps in a flash with the latest platform features. Read the getting started guide and look at our co

SlackAPI 684 Jan 09, 2023
A simple example of deploying FastAPI as a Zeit Serverless Function

FastAPI Zeit Now Deploy a FastAPI app as a Zeit Serverless Function. This repo deploys the FastAPI SQL Databases Tutorial to demonstrate how a FastAPI

Paul Weidner 26 Dec 21, 2022
Fastapi-ml-template - Fastapi ml template with python

FastAPI ML Template Run Web API Local $ sh run.sh # poetry run uvicorn app.mai

Yuki Okuda 29 Nov 20, 2022
OpenAPI for Todolist RESTful API

swagger-client OpenAPI for Todolist RESTful API This Python package is automatically generated by the Swagger Codegen project: API version: 1 Package

Iko Afianando 1 Dec 19, 2021
Light, Flexible and Extensible ASGI API framework

Starlite Starlite is a light and flexible ASGI API framework. Using Starlette and pydantic as foundations. Check out the Starlite documentation 📚 Cor

1.5k Jan 04, 2023
Pagination support for flask

flask-paginate Pagination support for flask framework (study from will_paginate). It supports several css frameworks. It requires Python2.6+ as string

Lix Xu 264 Nov 07, 2022
Instrument your FastAPI app

Prometheus FastAPI Instrumentator A configurable and modular Prometheus Instrumentator for your FastAPI. Install prometheus-fastapi-instrumentator fro

Tim Schwenke 441 Jan 05, 2023
This code generator creates FastAPI app from an openapi file.

fastapi-code-generator This code generator creates FastAPI app from an openapi file. This project is an experimental phase. fastapi-code-generator use

Koudai Aono 632 Jan 05, 2023
MQTT FastAPI Wrapper With Python

mqtt-fastapi-wrapper Quick start Create mosquitto.conf with the following content: ➜ /tmp cat mosquitto.conf persistence false allow_anonymous true

Vitalii Kulanov 3 May 09, 2022
Beyonic API Python official client library simplified examples using Flask, Django and Fast API.

Beyonic API Python Examples. The beyonic APIs Doc Reference: https://apidocs.beyonic.com/ To start using the Beyonic API Python API, you need to start

Harun Mbaabu Mwenda 46 Sep 01, 2022
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚡ Create CRUD routes with lighting speed ⚡ A dynamic FastAPI router that automatically creates CRUD routes for your models

Adam Watkins 950 Jan 08, 2023
A simple Blogging Backend app created with Fast API

This is a simple blogging app backend built with FastAPI. This project is created to simulate a real CRUD blogging system. It is built to be used by s

Owusu Kelvin Clark 13 Mar 24, 2022
Ansible Inventory Plugin, created to get hosts from HTTP API.

ansible-ws-inventory-plugin Ansible Inventory Plugin, created to get hosts from HTTP API. Features: Database compatible with MongoDB and Filesystem (J

Carlos Neto 0 Feb 05, 2022
SQLAlchemy Admin for Starlette/FastAPI

SQLAlchemy Admin for Starlette/FastAPI SQLAdmin is a flexible Admin interface for SQLAlchemy models. Main features include: SQLAlchemy sync/async engi

Amin Alaee 683 Jan 03, 2023
Voucher FastAPI

Voucher-API Requirement Docker Installed on system Libraries Pandas Psycopg2 FastAPI PyArrow Pydantic Uvicorn How to run Download the repo on your sys

Hassan Munir 1 Jan 26, 2022
Complete Fundamental to Expert Codes of FastAPI for creating API's

FastAPI FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3 based on standard Python type hints. The key featu

Pranav Anand 1 Nov 28, 2021
A comprehensive CRUD API generator for SQLALchemy.

FastAPI Quick CRUD Introduction Advantage Constraint Getting started Installation Usage Design Path Parameter Query Parameter Request Body Upsert Intr

192 Jan 06, 2023
Single Page App with Flask and Vue.js

Developing a Single Page App with FastAPI and Vue.js Want to learn how to build this? Check out the post. Want to use this project? Build the images a

91 Jan 05, 2023
Fetching Cryptocurrency Prices from Coingecko and Displaying them on Grafana

cryptocurrency-prices-grafana Fetching Cryptocurrency Prices from Coingecko and Displaying them on Grafana About This stack consists of: Prometheus (t

Ruan Bekker 7 Aug 01, 2022
This repository contains learning resources for Python Fast API Framework and Docker

This repository contains learning resources for Python Fast API Framework and Docker, Build High Performing Apps With Python BootCamp by Lux Academy and Data Science East Africa.

Harun Mbaabu Mwenda 23 Nov 20, 2022