SQLAlchemy ORM - Interact with relational databases easily

Published: 10 April 2023
on channel: Demos Petsas
984
24

In this video we will update our restful API and start using the SQLAlchemy ORM by introducing flask-sqlalchemy. flask-sqlalchemy is a Flask extension that uses the SQLAlchemy ORM and helps us work with our database. We will fetch all of our users from our database, fetch a single user, update a user, create a user as well as delete a user.

Chapters:
0:00 Intro
1:40 Install flask-sqlalchemy
2:00 Create extensions file - Use SQLAlchemy
2:58 Add SQLAlchemy extension to app
3:19 Add connection string
5:12 Create database
6:57 Create models
10:48 Create users table
13:30 Populate database
17:00 Read all users from the database
20:22 Create a user in the database
23:31 Find user or return 404 response
25:09 Find and update a user in the database
27:50 Delete a user from the database

Code:
https://github.com/demoskp/flask-sqla...

Personal website:
http://www.petsas.consulting


On this page of the site you can watch the video online SQLAlchemy ORM - Interact with relational databases easily with a duration of hours minute second in good quality, which was uploaded by the user Demos Petsas 10 April 2023, share the link with friends and acquaintances, this video has already been watched 984 times on youtube and it was liked by 24 viewers. Enjoy your viewing!