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
Github timeline htmx based web app rewritten from Common Lisp to Python FastAPI

python-fastapi-github-timeline Rewrite of Common Lisp htmx app _cl-github-timeline into Python using FastAPI. This project tries to prove, that with h

Jan Vlčinský 4 Mar 25, 2022
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
🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker

FastAPI + React · A cookiecutter template for bootstrapping a FastAPI and React project using a modern stack. Features FastAPI (Python 3.8) JWT authen

Gabriel Abud 1.4k Jan 02, 2023
Cookiecutter API for creating Custom Skills for Azure Search using Python and Docker

cookiecutter-spacy-fastapi Python cookiecutter API for quick deployments of spaCy models with FastAPI Azure Search The API interface is compatible wit

Microsoft 379 Jan 03, 2023
A simple Redis Streams backed Chat app using Websockets, Asyncio and FastAPI/Starlette.

redis-streams-fastapi-chat A simple demo of Redis Streams backed Chat app using Websockets, Python Asyncio and FastAPI/Starlette. Requires Python vers

ludwig404 135 Dec 19, 2022
LuSyringe is a documentation injection tool for your classes when using Fast API

LuSyringe LuSyringe is a documentation injection tool for your classes when using Fast API Benefits The main benefit is being able to separate your bu

Enzo Ferrari 2 Sep 06, 2021
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
FastAPI framework plugins

Plugins for FastAPI framework, high performance, easy to learn, fast to code, ready for production fastapi-plugins FastAPI framework plugins Cache Mem

RES 239 Dec 28, 2022
A rate limiter for Starlette and FastAPI

SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. Note: this is alpha quality code still, the API may change, and

Laurent Savaete 562 Jan 01, 2023
🔀⏳ 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
Opinionated authorization package for FastAPI

FastAPI Authorization Installation pip install fastapi-authorization Usage Currently, there are two models available: RBAC: Role-based Access Control

Marcelo Trylesinski 18 Jul 04, 2022
FastAPI with async for generating QR codes and bolt11 for Lightning Addresses

sendsats An API for getting QR codes and Bolt11 Invoices from Lightning Addresses. Share anywhere; as a link for tips on a twitter profile, or via mes

Bitkarrot 12 Jan 07, 2023
FastAPI + PeeWee = <3

FastAPIwee FastAPI + PeeWee = 3 Using Python = 3.6 🐍 Installation pip install FastAPIwee 🎉 Documentation Documentation can be found here: https://

16 Aug 30, 2022
Opentracing support for Starlette and FastApi

Starlette-OpenTracing OpenTracing support for Starlette and FastApi. Inspired by: Flask-OpenTracing OpenTracing implementations exist for major distri

Rene Dohmen 63 Dec 30, 2022
api versioning for fastapi web applications

fastapi-versioning api versioning for fastapi web applications Installation pip install fastapi-versioning Examples from fastapi import FastAPI from f

Dean Way 472 Jan 02, 2023
Generate modern Python clients from OpenAPI

openapi-python-client Generate modern Python clients from OpenAPI 3.x documents. This generator does not support OpenAPI 2.x FKA Swagger. If you need

Triax Technologies 558 Jan 07, 2023
FastAPI CRUD template using Deta Base

Deta Base FastAPI CRUD FastAPI CRUD template using Deta Base Setup Install the requirements for the CRUD: pip3 install -r requirements.txt Add your D

Sebastian Ponce 2 Dec 15, 2021
High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (w/ Redis and PostgreSQL).

fastapi-gino-arq-uvicorn High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (powered by Redis & PostgreSQL). Contents Get Star

Leo Sussan 351 Jan 04, 2023
Flood Detection with Google Earth Engine

ee-fastapi: Flood Detection System A ee-fastapi is a simple FastAPI web application for performing flood detection using Google Earth Engine in the ba

Cesar Aybar 69 Jan 06, 2023
A minimal FastAPI implementation for Django !

Caution!!! This project is in early developing stage. So use it at you own risk. Bug reports / Fix PRs are welcomed. Installation pip install django-m

toki 23 Dec 24, 2022