Myvideo

Guest

Login

Create A REST API with FastAPI, SQLAlchemy and PostgreSQL.

Uploaded By: Myvideo
1 view
0
0 votes
0

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: Github: Twitter:

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later