Flask Flashcards
What does an API allow different software applications to do?
Communicate with each other
What are the HTTP methods used in RESTful Routing, and what CRUD operations do they correspond to?
GET (Read), POST (Create), PUT (Update), DELETE (Delete)
Why do we use serialization in web development?
To convert objects into a format that can be easily stored or transmitted
What does ORM stand for, and which one is commonly used in Flask?
Object-Relational Mapping, SQLAlchemy
What command is used to create migration files, and which one is used to apply them?
flask db migrate, flask db upgrade
What method do you call to save changes to the database in SQLAlchemy?
db.session.commit()
Which library is commonly used with Formik for form validations?
Yup
What are two types of backend validations, and where are they defined?
Constraints and Validates decorator, in the models
How would you define a one-to-many relationship in SQLAlchemy?
Using db.relationship and db.ForeignKey
What is the main difference between a GET request and a POST request in terms of what they do?
GET requests retrieve data; POST requests send data