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
An alternative implement of Imjad API | Imjad API 的开源替代

HibiAPI An alternative implement of Imjad API. Imjad API 的开源替代. 前言 由于Imjad API这是什么?使用人数过多, 致使调用超出限制, 所以本人希望提供一个开源替代来供社区进行自由的部署和使用, 从而减轻一部分该API的使用压力 优势

Mix Technology 450 Dec 29, 2022
Simple notes app backend using Python's FastAPI framework.

my-notes-app Simple notes app backend using Python's FastAPI framework. Route "/": User login (GET): return 200, list of all of their notes; User sign

José Gabriel Mourão Bezerra 2 Sep 17, 2022
🚢 Docker images and utilities to power your Python APIs and help you ship faster. With support for Uvicorn, Gunicorn, Starlette, and FastAPI.

🚢 inboard 🐳 Docker images and utilities to power your Python APIs and help you ship faster. Description This repository provides Docker images and a

Brendon Smith 112 Dec 30, 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
Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application.

Flask-Bcrypt Flask-Bcrypt is a Flask extension that provides bcrypt hashing utilities for your application. Due to the recent increased prevelance of

Max Countryman 310 Dec 14, 2022
Restful Api developed with Flask using Prometheus and Grafana for monitoring and containerization with Docker :rocket:

Hephaestus 🚀 In Greek mythology, Hephaestus was either the son of Zeus and Hera or he was Hera's parthenogenous child. ... As a smithing god, Hephaes

Yasser Tahiri 16 Oct 07, 2022
Toolkit for developing and maintaining ML models

modelkit Python framework for production ML systems. modelkit is a minimalist yet powerful MLOps library for Python, built for people who want to depl

140 Dec 27, 2022
Boilerplate code for quick docker implementation of REST API with JWT Authentication using FastAPI, PostgreSQL and PgAdmin ⭐

FRDP Boilerplate code for quick docker implementation of REST API with JWT Authentication using FastAPI, PostgreSQL and PgAdmin ⛏ . Getting Started Fe

BnademOverflow 53 Dec 29, 2022
Ready-to-use and customizable users management for FastAPI

FastAPI Users Ready-to-use and customizable users management for FastAPI Documentation: https://fastapi-users.github.io/fastapi-users/ Source Code: ht

FastAPI Users 2.3k Dec 30, 2022
Signalling for FastAPI.

fastapi-signals Signalling for FastAPI.

Henshal B 7 May 04, 2022
fastapi-mqtt is extension for MQTT protocol

fastapi-mqtt MQTT is a lightweight publish/subscribe messaging protocol designed for M2M (machine to machine) telemetry in low bandwidth environments.

Sabuhi 144 Dec 28, 2022
Opinionated set of utilities on top of FastAPI

FastAPI Contrib Opinionated set of utilities on top of FastAPI Free software: MIT license Documentation: https://fastapi-contrib.readthedocs.io. Featu

identix.one 543 Jan 05, 2023
cookiecutter template for web API with python

Python project template for Web API with cookiecutter What's this This provides the project template including minimum test/lint/typechecking package

Hitoshi Manabe 4 Jan 28, 2021
Prometheus integration for Starlette.

Starlette Prometheus Introduction Prometheus integration for Starlette. Requirements Python 3.6+ Starlette 0.9+ Installation $ pip install starlette-p

José Antonio Perdiguero 229 Dec 21, 2022
Town / City geolocations with FastAPI & Mongo

geolocations-api United Kingdom Town / City geolocations with FastAPI & Mongo Build container To build a custom image or extend the api run the follow

Joe Gasewicz 3 Jan 26, 2022
FastAPI + Postgres + Docker Compose + Heroku Deploy Template

FastAPI + Postgres + Docker Compose + Heroku Deploy ⚠️ For educational purpose only. Not ready for production use YET Features FastAPI with Postgres s

DP 12 Dec 27, 2022
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
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
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