Embedding SQL queries within the backend of a web application can
make it hard to maintain and extend functionality. In this course, Creating a Model Layer for Flask,
you’ll learn to implement a model layer using SQLAlchemy and avoid these issues.
First, you’ll explore the setup of SQLAlchemy and how to replace existing SQL queries.
Next, you’ll discover how to extend an application using the model layer.
Finally, you’ll learn how to manage authorization on views for both interactive and automated users. When you’re finished with this course, you’ll have the skills and knowledge of Flask needed to refactor or extend a model layer.
Course Overview Hello, my name is Chris Green, and welcome to my course, Creating a Model Layer for Flask. I am best described as a computer and data wrangler. Over the years, I have built systems and software for data, web applications, and security. Python is my favorite language for its simplicity and ability to do almost anything well. Flask is a de facto standard in PythonWare applications and something that all Python developers will encounter eventually. Object‑relational mapping is a powerful and widespread concept to master in software engineering, whether in Python or any other language. This course will teach you how to use the SQLAlchemy Object Relational Mapper to add a model layer into a Flask application, making the code cleaner, more extendable, and often, more secure. You will see how to achieve this by taking an existing Flask application, and first, refactoring it to use SQLAlchemy models, then beginning to extend functionality through new models, and finally, integrating the model layer with other Flask packages. By the end of this course, you will know how to create Python models using Flask‑SQLAlchemy, changing application database using Flask‑Migrate, and handle user authorization with Flask‑Login. This course is part of the learning path Building Web Applications with Flask. Before starting, you should be familiar with Python in general, Flask applications, and basic relational database concepts. From here, you should also find it easy to learn how to implement a model layer in other languages too. I hope you'll join me to learn how to create a model layer for Flask here on Pluralsight.