Inserting Values to Database - Flask SQLAlchemy

Опубликовано: 31 Октябрь 2024
на канале: Netizzan
274
1

in this video, I will show you how to Create the repr() dunder method, Insert values to the database and create API using Flask SQLAlchemy

The python _repr_ dunder method allows object to be written out as strings.
It will follow the format which was returned in the method when one prints.

person1 = Person(name='Teejay')
print(person1)

OUTPUT:
Person id: None, name: Teejay

Timestamp;
00:00 Creating repr dunder method
03:20 Running the app
05:24 Inserting values to the database
11:09 Creating APIs
17:06 Conclusion