Phase 4 Study Guide
Welcome to my comprehensive study guide designed to help you master Flask! This guide is divided into multiple modules, each focusing on a specific topic related to Flask, such as routing, database interactions, API development, and more.
Each module includes a Study Goal to clarify what you should aim to learn, Topics to Cover that list the key points you’ll focus on, and a Lab exercise to apply what you’ve learned.
Flask Routing and Views Lab
Study Goal:
Master Flask routing mechanisms.
Topics to Cover:
- Basic and dynamic routing in Flask
- HTTP methods (
GET
,POST
, etc.)
Lab:
Create an application with multiple routes and HTTP methods.
Flask-SQLAlchemy, Part 1 & 2 and Lab
Study Goal:
Learn how to use the Flask-SQLAlchemy
extension for database operations.
Topics to Cover:
- Initialize
Flask-SQLAlchemy
- CRUD operations
- Model relationships
Lab:
Create a Flask application that uses Flask-SQLAlchemy
for CRUD operations.
Building a GET API and Building a POST/PATCH/DELETE API and Lab
Study Goal:
Understand how to build APIs for CRUD operations using Flask.
Topics to Cover:
- Flask API endpoints
- Using
request
andjsonify
Lab:
Build a CRUD API in Flask to perform GET, POST, PATCH, and DELETE operations.
REST APIs with Flask-RESTful
Study Goal:
Use the Flask-RESTful
extension to build RESTful APIs.
Topics to Cover:
- Resource classes in
Flask-RESTful
- API routing with
Flask-RESTful
Lab:
Convert your existing CRUD API to use Flask-RESTful
.
Constraints and Validations with SQLAlchemy
Study Goal:
Use SQLAlchemy’s features to add constraints and validations.
Topics to Cover:
- Unique constraints
- Field validations
Lab:
Integrate constraints and validations into your CRUD API.
Identity and Access Management with Flask-Login or Flask-Security
Study Goal:
Implement authentication and authorization using Flask-Login
or Flask-Security
.
Topics to Cover:
- User authentication
- Role-based authorization
Lab:
Add authentication and authorization features to your CRUD API.
Deployment with Flask and Render
Study Goal:
Learn how to deploy your Flask API.
Topics to Cover:
- Deploying Flask app to Render
- Using databases in production
Lab:
Deploy your CRUD API and front-end, if applicable, on Render.
[Optional] Data Serialization with Marshmallow
Study Goal:
Use the Marshmallow
extension for data serialization and deserialization.
Topics to Cover:
- Defining schemas
- Object serialization
Lab:
Implement Marshmallow in your existing CRUD API.
[Optional] HATEOAS
Study Goal:
Implement HATEOAS in your RESTful API.
Topics to Cover:
- Principles of HATEOAS
- Adding hypermedia controls to your API
Lab:
Integrate HATEOAS principles into your existing CRUD API.
References:
Flatiron School, Software Engineer Program, Course Modules: Phase 4 - Full Stack. (n.d.). Retrieved September 21, 2021, from https://my.learn.co/courses/654/modules