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
Auf dieser Seite können Sie das Online-Video SQLAlchemy ORM - Interact with relational databases easily mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Demos Petsas 10 April 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 984 Mal angesehen und es wurde von 24 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!