Create A REST API with FastAPI, SQLAlchemy and PostgreSQL.

preview_player
Показать описание
FastAPI is a Python framework and set of tools that allow developers to invoke commonly used functions using a REST interface.

SQLAlchemy is a package that makes it easier for Python programs to communicate with databases. Most of the time, this library is used as an Object Relational Mapper (ORM) tool, which automatically converts function calls to SQL queries and translates Python classes to tables on relational databases.

Many web, mobile, geospatial, and analytics applications use PostgreSQL as their primary data storage or data warehouse.

In this video, I build a simple REST API using the above technologies.

If you have learned from this video, please like comment , like and share.

Do not forget to subscribe to the channel for content like this in the future.

Timestamps
0:00 Introduction and project set up
2:05 Implement simple routes
3:26 Running with uvicorn
8:22 Creating a schema with Pydantic
15:56 Creating optional query parameters
19:35 Setting up PostgreSQL with SQLAlchemy
27:05 Creating database model with SQLAlchemy
39:55 Write database model to database
42:37 Create the CRUD routes
47:53 Get all items
51:24 Create an item
52:12 Setting response status code
58:09 Raising Http exceptions
1:02:28 Get one item
1:04:55 Update an item
1:10:25 Delete an item
1:18:40 Documenting the API with Swagger and Redoc
1:20:00 Wrapping Up
SOURCE CODE:

Рекомендации по теме
Комментарии
Автор

50K Views! Thanks for watching. Really appreciate this video. Would you love an updated more detailed video on this series?

SsaliJonathan
Автор

Great tutorial, thank you!

Taught me more than just the REST + CRUD stuff. You were very good at explaining other parts like the types, optionals and etc.

hizkra
Автор

Amazing video, thank you Jonathan. I learned a ton, and was exactly what I needed for what I'm learning to do.

jjasghar
Автор

Great video. I spent three days trying to do the same, finally someone who explains everything in a simple way. I subbed 👍

MrCentrax
Автор

Your video definitely helped me get a grasp on the basics. Pretty awesome stuff, thanks!

christopherkramer
Автор

Amazing video! This is the best guide for building an API with FastAPI on YouTube! Thanks a lot for your help brother ✊🏿

Sending my gratitude and love from New York City.

phasematerialsresearch
Автор

You are one of the best teachers. Thank you Jonathan.

codewithsai
Автор

Thank you so much for this very informative video of yours Mr. Jonathan!

ericcanete
Автор

Thank you for making this video! It helped a lot!

aya
Автор

Fantastic tutorial thank you, very clear and easy to understand for a beginner :)

nKiwiEffecTz
Автор

Listen man! You're a legend. This is exactly what I needed and Youtube algorithms served it to me!

MyStockz
Автор

Very well done Jonathan, keep it up. Started following you!

giovanni
Автор

great explanation, really easy to learn.
thank you very much!

kamitzayig
Автор

Amazing video man, you are doing a great job!

darkgll
Автор

Great content, hoping to see more content like this soon.

schoolbook
Автор

this video was really so helpful to understand the sqlalchemy, thank you to make such a great video jonathan

LegendGame
Автор

Perfect Tutorial bro. To much love from Turkey! Thanks for all explaning and joyful presentation! Subscribed & Liked

cakitomakito
Автор

The best video to learn fastapi crud operations quickly and with understanding❤...

theparten
Автор

Just subbed. Your work is the best on YouTube for modern API dev! I would love a large Flask, React, PosgreSQL, Guinicorn, Swagger, Docker and Kubernetes mega tutorial if you ever were planning new larger videos. Thanks in advance!

mytechnotalent
Автор

Great work young man, you are an inspiration to many.

israelphiri