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
✨️🐍 SPARQL endpoint built with RDFLib to serve machine learning models, or any other logic implemented in Python

✨ SPARQL endpoint for RDFLib rdflib-endpoint is a SPARQL endpoint based on a RDFLib Graph to easily serve machine learning models, or any other logic

Vincent Emonet 27 Dec 19, 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
CLI and Streamlit applications to create APIs from Excel data files within seconds, using FastAPI

FastAPI-Wrapper CLI & APIness Streamlit App Arvindra Sehmi, Oxford Economics Ltd. | Website | LinkedIn (Updated: 21 April, 2021) fastapi-wrapper is mo

Arvindra 49 Dec 03, 2022
A utility that allows you to use DI in fastapi without Depends()

fastapi-better-di What is this ? fastapi-better-di is a utility that allows you to use DI in fastapi without Depends() Installation pip install fastap

Maxim 9 May 24, 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
fastapi-cache is a tool to cache fastapi response and function result, with backends support redis and memcached.

fastapi-cache Introduction fastapi-cache is a tool to cache fastapi response and function result, with backends support redis, memcache, and dynamodb.

long2ice 551 Jan 08, 2023
Cbpa - Coinbase Pro Automation for buying your favourite cryptocurrencies

cbpa Coinbase Pro Automation for making buy orders from a default bank account.

Anthony Corletti 3 Nov 27, 2022
🔀⏳ Easy throttling with asyncio support

Throttler Zero-dependency Python package for easy throttling with asyncio support. 📝 Table of Contents 🎒 Install 🛠 Usage Examples Throttler and Thr

Ramzan Bekbulatov 80 Dec 07, 2022
Simple web app example serving a PyTorch model using streamlit and FastAPI

streamlit-fastapi-model-serving Simple example of usage of streamlit and FastAPI for ML model serving described on this blogpost and PyConES 2020 vide

Davide Fiocco 291 Jan 06, 2023
Keycloack plugin for FastApi.

FastAPI Keycloack Keycloack plugin for FastApi. Your aplication receives the claims decoded from the access token. Usage Run keycloak on port 8080 and

Elber 4 Jun 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
Sample project showing reliable data ingestion application using FastAPI and dramatiq

Create and deploy a reliable data ingestion service with FastAPI, SQLModel and Dramatiq This is the source code for the data ingestion service explain

François Voron 31 Nov 30, 2022
FastAPI Skeleton App to serve machine learning models production-ready.

FastAPI Model Server Skeleton Serving machine learning models production-ready, fast, easy and secure powered by the great FastAPI by Sebastián Ramíre

268 Jan 01, 2023
API for Submarino store

submarino-api API for the submarino e-commerce documentation read the documentation in: https://submarino-api.herokuapp.com/docs or in https://submari

Miguel 1 Oct 14, 2021
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
REST API with FastAPI and PostgreSQL

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

Luis Quiñones Requelme 1 Nov 11, 2021
FastAPI-Amis-Admin is a high-performance, efficient and easily extensible FastAPI admin framework. Inspired by django-admin, and has as many powerful functions as django-admin.

简体中文 | English 项目介绍 FastAPI-Amis-Admin fastapi-amis-admin是一个拥有高性能,高效率,易拓展的fastapi管理后台框架. 启发自Django-Admin,并且拥有不逊色于Django-Admin的强大功能. 源码 · 在线演示 · 文档 · 文

AmisAdmin 318 Dec 31, 2022
Redis-based rate-limiting for FastAPI

Redis-based rate-limiting for FastAPI

Glib 6 Nov 14, 2022
FastAPI interesting concepts.

fastapi_related_stuffs FastAPI interesting concepts. FastAPI version :- 0.70 Python3 version :- 3.9.x Steps Test Django Like settings export FASTAPI_S

Mohd Mujtaba 3 Feb 06, 2022
Twitter API monitor with fastAPI + MongoDB

Twitter API monitor with fastAPI + MongoDB You need to have a file .env with the following variables: DB_URL="mongodb+srv://mongodb_path" DB_URL2=

Leonardo Ferreira 3 Apr 08, 2022