Intermediate Flask: APIs & User Authentication
Keep adding new skills with 10,000+ programs for $239 (usually $399). Save now.
Intermediate Flask: APIs & User Authentication
This course is part of The Ultimate Flask Course Specialization
Included with
Learn more
Ask Coursera
Recommended experience
Recommended experience
What you'll learn
Build robust APIs with Flask that handle various CRUD operations.
Secure your Flask APIs using authentication and decorators.
Manage databases effectively using Flask-SQLAlchemy and Flask-Migrate.
Implement dynamic forms with Flask-WTF and enhance user interfaces with Flask-Bootstrap.
Skills you'll gain
Details to know
April 2026
12 assignments
See how employees at top companies are mastering in-demand skills
Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate
There are 10 modules in this course
This course features Coursera Coach!
A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. Take your Flask skills to the next level with this course focused on APIs and user authentication. You will gain hands-on experience building advanced Flask applications by creating member APIs, integrating Flask-SQLAlchemy for database management, and securing your API endpoints with authentication. You'll also learn how to deploy your app to platforms like Python Anywhere for public access. By the end, you'll be able to build robust, scalable web applications that securely manage user data and handle various requests. This course delves deep into Flask-SQLAlchemy, exploring database creation, data manipulation, and the setup of complex relationships, including one-to-many and many-to-many. You'll also focus on building APIs that allow users to create, retrieve, update, and delete data. With Flask-WTF and Flask-Bootstrap, you'll handle dynamic forms and enhance the front-end design of your application, making it more user-friendly. This is a project-based learning course, and each section introduces you to new challenges that build on each other. Ideal for developers with foundational Flask knowledge, this course is perfect for those looking to develop more complex applications and secure them with user authentication features. The course is designed for intermediate learners who already have some Python and Flask experience, but beginners with a solid understanding of Python may also benefit. By the end of the course, you will be able to build fully functional APIs, handle user authentication, and manage databases effectively in Flask applications. By the end of the course, you will be able to develop and deploy APIs with Flask, implement advanced authentication techniques, manage databases using Flask-SQLAlchemy, and integrate dynamic forms in your applications.
In this module, we will explore the core features and functionalities of building a question and answer app with Flask. You will learn how to manage user authentication, create and answer questions, and dynamically display user-generated content. The section also covers securing routes and deploying your app to Heroku for online access.
What's included
27 videos2 readings1 assignment
27 videosβ’Total 165 minutes
- Demoβ’2 minutes
- Overview of Templatesβ’2 minutes
- Install and Templatesβ’8 minutes
- Database Helpersβ’2 minutes
- Creating the Databaseβ’3 minutes
- Register Userβ’8 minutes
- Loginβ’7 minutes
- Sessionsβ’6 minutes
- Common User Functionβ’6 minutes
- Updating Linksβ’7 minutes
- Creating Test Usersβ’3 minutes
- User Setup Pageβ’8 minutes
- Create Questionβ’10 minutes
- List Questionsβ’7 minutes
- Answer Questionβ’8 minutes
- Home Route Questionsβ’6 minutes
- Question Pageβ’4 minutes
- Preventing Duplicate Usersβ’7 minutes
- Protecting Routesβ’4 minutes
- Protecting Routes by Roleβ’3 minutes
- Login Failure Messagesβ’5 minutes
- Formatting Queriesβ’3 minutes
- Added Link Macroβ’5 minutes
- Base Templateβ’9 minutes
- Deploy to Herokuβ’8 minutes
- Convert to Postgresβ’25 minutes
- Static Secret Key On Herokuβ’2 minutes
2 readingsβ’Total 20 minutes
- Introduction to the Course 'Intermediate Flask: APIs & User Authentication'β’10 minutes
- Full Specialization Resourcesβ’10 minutes
1 assignmentβ’Total 15 minutes
- Question & Answer App - Assessmentβ’15 minutes
In this module, we will build a Member API to handle CRUD operations for managing user data. You will learn how to secure your API with authentication and deploy it to Python Anywhere for public access. The section also demonstrates how to test your API using Postman and interact with the database efficiently.
What's included
13 videos1 assignment
13 videosβ’Total 57 minutes
- Demoβ’3 minutes
- Setting Up The App and Test With Postmanβ’6 minutes
- Adding Database Helpersβ’2 minutes
- Create the Databaseβ’2 minutes
- Create a New Memberβ’6 minutes
- Return Member After Creationβ’4 minutes
- Get All Membersβ’4 minutes
- Get One Memberβ’3 minutes
- Edit A Memberβ’6 minutes
- Delete A Memberβ’2 minutes
- Authenticationβ’5 minutes
- Authentication Decoratorβ’5 minutes
- Deploy to Python Anywhereβ’9 minutes
1 assignmentβ’Total 15 minutes
- Member API - Assessmentβ’15 minutes
In this module, we will explore how to use Flask-SQLAlchemy to manage your appβs database. You will learn how to define models, perform CRUD operations, and write complex queries to retrieve and manipulate data. This section also covers managing one-to-many and many-to-many relationships for effective data modeling.
What's included
23 videos1 assignment
23 videosβ’Total 84 minutes
- Setting Up A Database and Determining the URIβ’3 minutes
- Installing Flask-SQLAlchemyβ’1 minute
- Connecting to the Databaseβ’6 minutes
- Create a Tableβ’10 minutes
- Inserting Dataβ’3 minutes
- Updating Dataβ’3 minutes
- Deleting Dataβ’1 minute
- Intro to Queriesβ’7 minutes
- Generative Queriesβ’5 minutes
- Not Equals and Likeβ’3 minutes
- In and Not Inβ’2 minutes
- Null and Not Nullβ’2 minutes
- Andβ’3 minutes
- Orβ’2 minutes
- Order Byβ’3 minutes
- Limitβ’2 minutes
- Offsetβ’2 minutes
- Countβ’1 minute
- Inequalityβ’2 minutes
- One to Many Relationshipsβ’6 minutes
- One to Many Queriesβ’5 minutes
- Many to Many Relationshipsβ’6 minutes
- Many to Many Queriesβ’6 minutes
1 assignmentβ’Total 15 minutes
- Flask SQLAlchemy - Assessmentβ’15 minutes
In this module, we will dive deeper into Flask-SQLAlchemy through practical examples. You will learn how to define database relationships, insert and update data, and run optimized queries. The section also focuses on real-world use cases such as querying customer orders, revenue, and other key metrics.
What's included
15 videos1 assignment
15 videosβ’Total 67 minutes
- Install and Set Upβ’3 minutes
- Create the Modelsβ’9 minutes
- Create the Relationshipsβ’7 minutes
- Create the Databaseβ’2 minutes
- Insert Dataβ’7 minutes
- Updating Dataβ’2 minutes
- Deleting Dataβ’2 minutes
- Populating the Databaseβ’7 minutes
- Get All Customer Ordersβ’4 minutes
- Get All Pending Ordersβ’3 minutes
- How Many Customersβ’1 minute
- Get Orders With Coupon Codesβ’2 minutes
- Get Revenue in Past X Daysβ’7 minutes
- Get the Average Fulfillment Timeβ’6 minutes
- Get Customers Who Have Purchased More Than $Xβ’4 minutes
1 assignmentβ’Total 15 minutes
- Flask SQLAlchemy By Example - Assessmentβ’15 minutes
In this module, we will cover how to create and handle forms using Flask-WTF. You will learn how to validate user input, manage form fields, and use custom validation logic to enhance user experience. The section also demonstrates integrating forms with other Flask extensions for more complex workflows.
What's included
23 videos1 assignment
23 videosβ’Total 130 minutes
- Install and Set Upβ’2 minutes
- Creating a Formβ’7 minutes
- Submit the Formβ’4 minutes
- Validatorsβ’10 minutes
- More Fieldsβ’6 minutes
- Adding An Extra Validatorβ’3 minutes
- Changing Labels and Defaultsβ’2 minutes
- Prepopulating Dataβ’3 minutes
- Populate Objβ’3 minutes
- More on CSRFβ’3 minutes
- Jinja Macroβ’5 minutes
- Form Inheritanceβ’3 minutes
- Field Enclosuresβ’7 minutes
- Field Listβ’9 minutes
- Delete Fieldβ’2 minutes
- Dynamic Formsβ’7 minutes
- Note on JavaScript AJAXβ’2 minutes
- Recaptcha Fieldβ’5 minutes
- Inline Validatorsβ’2 minutes
- Information on Other Fields and Validatorsβ’1 minute
- Date Fieldsβ’5 minutes
- Flask-WTF Exampleβ’20 minutes
- Flask-WTF with Flask-Bootstrapβ’20 minutes
1 assignmentβ’Total 15 minutes
- Flask WTF - Assessmentβ’15 minutes
In this module, we will explore how to use Flask-Bootstrap to build attractive and responsive web pages. You will learn how to integrate Flask-Bootstrap components into your templates and optimize UI elements for better user interaction. The section also covers creating flexible templates and layouts using Flask-Bootstrapβs built-in blocks.
What's included
3 videos1 assignment
3 videosβ’Total 8 minutes
- Installation Setupβ’2 minutes
- Blank HTMLβ’2 minutes
- Available Blocksβ’5 minutes
1 assignmentβ’Total 15 minutes
- Flask Bootstrap - Assessmentβ’15 minutes
In this module, we will cover how to send and manage emails within your Flask app using Flask-Mail. You will learn how to configure the email server, send emails to multiple recipients, and add attachments. The section also demonstrates how to integrate Gmail and handle advanced email parameters for robust communication.
What's included
10 videos1 assignment
10 videosβ’Total 29 minutes
- Configurationβ’5 minutes
- Set Up Server and Send Emailβ’5 minutes
- Note on Debugβ’1 minute
- Email Bodyβ’2 minutes
- Adding More Recipientsβ’2 minutes
- Adding Sender Nameβ’2 minutes
- Bulk Messagesβ’4 minutes
- Attachmentsβ’4 minutes
- Other Message Parametersβ’2 minutes
- Setting Up Gmailβ’2 minutes
1 assignmentβ’Total 15 minutes
- Flask Mail - Assessmentβ’15 minutes
In this module, we will explore Flask-Migrate to manage database schema changes and migrations in your Flask app. You will learn how to apply upgrades and downgrades, work with different database systems, and manually edit migration files. The section also demonstrates managing database versions effectively with Flask-Migrate.
What's included
9 videos1 assignment
9 videosβ’Total 21 minutes
- Installation and Environment Variable Setupβ’1 minute
- Creating Database, Adding SQLAlchemy and Migrateβ’3 minutes
- Create Table Upgrade in SQLiteβ’4 minutes
- Upgrading With SQLiteβ’2 minutes
- SQLite Downgradesβ’2 minutes
- Upgrading and Downgradingβ’2 minutes
- MySQL Upgrade and Downgradeβ’3 minutes
- Manually Edit Migrationβ’4 minutes
- Dropping Columns in SQLiteβ’2 minutes
1 assignmentβ’Total 15 minutes
- Flask Migrate - Assessmentβ’15 minutes
In this module, we will cover how to handle file uploads in Flask using the Flask-Uploads extension. You will learn how to create upload forms, restrict file types, and manage uploaded files within your application. The section also explores best practices for organizing and storing files securely in Flask.
What's included
6 videos1 assignment
6 videosβ’Total 20 minutes
- Installation and Configurationβ’7 minutes
- Upload Formβ’2 minutes
- Uploading First Imageβ’5 minutes
- Allow and Denyβ’3 minutes
- Default Destβ’2 minutes
- Combining Extensionsβ’1 minute
1 assignmentβ’Total 15 minutes
- Flask Uploads - Assessmentβ’15 minutes
In this module, we will explore how to use Flask-Login to manage user authentication in your Flask applications. You will learn how to create login forms, protect routes, and implement session management features such as "Remember Me." The section also demonstrates how to handle login success, failures, and automatic session expiration for enhanced security.
What's included
15 videos1 reading3 assignments
15 videosβ’Total 68 minutes
- Installation and Initβ’2 minutes
- Add User Modelβ’4 minutes
- The User Loaderβ’2 minutes
- Login Userβ’5 minutes
- Current Userβ’2 minutes
- Logout Userβ’2 minutes
- Creating a Login Formβ’5 minutes
- Redirect to Login Routeβ’1 minute
- Login Messageβ’3 minutes
- Redirectβ’5 minutes
- Remember Meβ’3 minutes
- Fresh Loginβ’3 minutes
- Auto Expireβ’11 minutes
- Alternative Tokensβ’8 minutes
- Using MongoDBβ’13 minutes
1 readingβ’Total 10 minutes
- Conclusion to the Course 'Intermediate Flask: APIs & User Authentication'β’10 minutes
3 assignmentsβ’Total 90 minutes
- Full Course Practice Assessmentβ’15 minutes
- Flask Login - Assessmentβ’15 minutes
- Full Course Assessmentβ’60 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor
Offered by
Explore more from Software Development
- Status: Free Trial
- Status: Free Trial
Course
- Status: Free Trial
Specialization
Why people choose Coursera for their career
Frequently asked questions
Flask is a lightweight web framework for Python that is highly flexible and ideal for building web applications and APIs. It is relevant because it allows developers to quickly create robust, scalable applications without being tied down to unnecessary complexity. Flask is particularly suited for building APIs and implementing user authentication systems, which are key components in modern web applications.
The "Intermediate Flask: APIs & User Authentication" course focuses on expanding your knowledge of Flask by teaching you how to build APIs, implement user authentication, and manage databases efficiently. Youβll work with Flask-SQLAlchemy for database management, Flask-Login for authentication, Flask-WTF for handling forms, and explore other Flask extensions like Flask-Mail and Flask-Migrate. The course includes hands-on projects and real-world examples to reinforce your learning.
After completing this course, you will be able to build secure web APIs using Flask and integrate user authentication into your applications. You'll understand how to handle database operations with Flask-SQLAlchemy, manage user sessions with Flask-Login, and ensure secure communication with Flask-Mail. Additionally, you'll gain experience deploying applications and working with various Flask extensions to enhance functionality.
More questions
Financial aid available,
