Flask-rest Api with sqlalchemy database

SQLalchemy:— pip install flask-sqlalchemy

context_app:—you want to use more than one application or create the application dynamically in a function .(If you try to perform database operations outside an application context, you will see the following error:
No application found. Either work inside a view function or push an application context.
We solve it using : context_app using


Security.py :—


Output:—- open terminal:–
From app import db
db. create_all()
(Database creates, “data.sqlite )
Run : app.py

Open postman :— (create two puppy name using post)—-post(method)—-post

(We want to see all the list of our puppies)—-get

(Here we want to delete shammy)—-Delete

Open chat