
Build three real-world FastAPI apps by progressively creating a car information viewer, a secure social feed with OAuth 2, and a SQLite-backed to-do list using SQLAlchemy, mastering full-stack development.
Learn fastapi essentials from path operations to dependencies, handling requests, and pydantic models, with SQL, OAuth 2, and web security for real-world apps.
Explore the fundamentals of APIs, REST architecture, and CRUD operations, and learn how HTTP requests, headers, and status codes enable frontend–back end communication with JSON data.
Explore how fast API designs APIs in Python using open API and Json schema, leveraging type hints and Pydantic models to create validated, well-structured endpoints.
Type hints clarify variable types for editors and libraries, and in FastAPI they help restrict and construct your API endpoints using special types, while not changing the function's operation.
Explore pydantic models for fastapi by installing pydantic, defining a base model, using the typing module for lists and dicts, and composing inherited, nested models with optional fields.
Design a Pydantic social media post model with author, optional co-author, date, title, content, id, and likes; include a comments list with author, comment, and likes.
Implement a social media post model with Pydantic and pedantic base model, including optional co-author, date, id, likes, and nested comments.
Explore building a car information viewer with fast API fundamentals: search by id, create, edit, and delete cars via a json api, then render pages using Jinja2 and Bootstrap.
Create a FastAPI get /cars route using a mock database, with a Pydantic response model for a list of cars, and an optional query parameter to limit results.
Create a get car by id route in FastAPI using path parameters and a required integer id with Path validations, then return a car Pydantic model or raise a 404.
Update a car with a FastAPI put route that accepts optional fields for partial updates, validates the id, and returns a dictionary mapping a string to the updated car.
Delete a car by sending a delete request to a path with the car id, validate the id, delete it, and confirm with a 200 response.
Design the front end by setting up HTML templates with Jinja2 in FastAPI, organizing templates and static directories, and mounting static files to serve HTML responses.
Create and serve your first html page from a FastAPI API using jinja2 templates, passing the request and variables like title and text to the template response.
Split the home page into header and footer components with Jinja include, set default titles, and serve static files via url_for and a bootstrap CDN.
Design a responsive navigation bar using bootstrap, including logo, links, and a search form, built as a reusable navbar component for all pages with a dark theme.
Use Jinja templating and for loops to build a reusable car component, then render multiple cars with Bootstrap grid and properties like year, make, model, price, engine, and autonomous features.
Add a search feature by wiring a nav form to a fast API /search route, handle form data, and render a page showing the car or a not found message.
Implement an edit feature for the car viewer: add an edit button with a query id, load a pre-filled edit form, and post updates with a redirect.
Add a delete feature to a FastAPI app by wiring a red delete button to a /delete/{id} get route, and returning a redirect to the cars list.
Preview a social media feed app built with FastAPI, detailing authentication with password hashing, JWT tokens, cookies, environment variables, and secure login, register, and logout flows.
Install three libraries, including FastAPI login, bcrypt via pathlib, and python-dotenv; create main.py, mount static, set up templates, and a root route for testing with uvicorn.
Create Pydantic models for a user database, including a public user model and a database model with a hashed password, plus a notification model with author and description.
Integrate header, nav bar, and footer into a reusable base for a home page using Bootstrap, CSS, and Jinja templates, then render index.html via a template response.
Create a login page in a FastAPI app by building login.html with username and password fields. It posts to /login and prepares an invalid message placeholder for future login.
Implement password hashing to protect user passwords by converting them into irreversible hashes, then build hashing and verification functions using a crypt context with bcrypt in your app.
Implement user verification with fast api login, using a login manager, JWT tokens, and cookies, and get user from db via authentication logic.
Create a FastAPI login endpoint using OAuth2 password request form, authenticate users, issue an access token, set a cookie, and redirect unauthenticated requests to login.
Implement a logout mechanism by clearing the authentication cookie (token) and redirecting to the home page, using a /logout endpoint and a redirect response.
Create the front-end registration form by adding a /register HTML endpoint and rendering Register.html with username, email, name, and password fields. Style the form for centered display and bootstrap-ready layout.
Learn to build a back-end user registration in FastAPI by converting optional fields, validating unique usernames and emails, hashing passwords, storing new users, and redirecting to login with template feedback.
Convert home page into a front-end display of user information by rendering a template with the user object excluding the hashed password, using Bootstrap to show name, username, and friends.
Create and display a user notifications section by looping through user.notifications, rendering each notification’s author and description with clean styling, and show a 'no new notifications' message when empty.
Make bug fixes and refactor a FastAPI app by enabling the nav bar collapse, removing unused arguments, and streamlining login and registration flows for better security.
Create a real-time SQLite-backed to-do list app with OAuth2 web security, featuring user registration, login, task addition and completion, and logout, implemented in Python with SQLite integration.
Set up a FastAPI app by installing SQLAlchemy and Alembic, creating main, crud, db, schemas, and models, plus templates and static directories, and add a basic get route with uvicorn.
Create header, footer, and nav bar components in a FastAPI app, linking templates, static styles, and bootstrap to deliver a dynamic index.html with tasks, login, and register routes.
Enhance the home page with a centered welcome, a bootstrap container, and descriptive text prompting users to create an account or log in, setting up a future protected route.
Set up the database with SQLAlchemy by creating an engine, a declarative base, and a session maker, configure SQLite with check_same_thread set to false, and build the database context.
Create pydantic models for tasks and users using base schemas, with separate read and create classes, and enable orm mode to map database data for real-world apps.
Create database models in models.py using SQLAlchemy, inheriting from the base in db.py, defining user and task tables with columns, foreign keys, and relationships to back populate users and tasks.
Wire a FastAPI app to a database by importing db components, creating a get_db dependency with a with statement and yield, and using Depends for a simple tasks route.
Learn to manage database migrations with Alembic for SQLAlchemy projects, including setup, autogenerate revisions, and upgrades or downgrades based on the declarative base.
Develop a login page with a FastAPI login manager, cookie-based session, and CRUD utilities to fetch users by id or username using SQLAlchemy.
Learn to implement login in FastAPI by hashing passwords with bcrypt, building a user loader, authenticating with OAuth2, issuing access tokens, storing them in cookies, and securing routes.
Master FastAPI registration by building a registration page, implementing CRUD for user management, including get user by email and create user with UUID, and rendering register.html.
Implement a logout mechanism in FastAPI by clearing the authentication cookie with a response, redirecting to the home page, and validating the redirect to the login page after logout.
Build a tasks list in FastAPI by fetching tasks for a user, rendering them with a Jinja template, and styling with Bootstrap and Font Awesome icons.
Add tasks to a FastAPI app by converting the todo page into a post form to /tasks, linking tasks to users and showing validation errors.
Add a delete task operation and route to remove a task by id, commit changes, and redirect to /tasks. Ensure the user is authenticated before deletion.
Celebrate completing the course and building three real-world FastAPI apps; continue practicing with old projects, add validations and features, and explore next steps with the provided resources.
There is a lot that goes into full stack web development.
With databases, REST architecture, HTTP requests, OAuth2, and all the other protocols that go alongside full stack web development, it can be hard to learn, especially when coupled with a complicated framework like FastAPI and the nuanced parts of Python.
This course aims to eliminate that confusion by teaching FastAPI from the very basics to the advanced level. It combines theory and practical use to give you everything you need to learn FastAPI, all while allowing you to build 3 full-stack web applications written primarily in Python along the way.
Throughout the course, you will:
Create 3 full-stack applications using FastAPI in Python and industry-standard practices
Use Jinja2, Bootstrap, HTML, and CSS to create front-end templates with control flow (conditionals, loops, etc.)
Fundamentally understand REST API architecture and how to implement REST APIs in FastAPI
Use database browsers and SQLAlchemy to create, manage, update, and parse SQLite databases
Create user authentication and registration logic with error handling
Understand HTTP, how it works, and how to make requests, including methods, headers, bodies, and status codes
Format programmatic data to include in front-end pages
Parse HTTP requests in python and extract relevant data, including parameters, form data, and request bodies
Validate HTTP routes and implement error handling in REST APIs and full-stack applications
Understand JSON and how to both parse and return it using Python
Use Pydantic and type hints to create data models and schemas in Python
Hash and verify passwords in Python
Create OAuth2 flows and use them to authenticate users using FastAPI logic
Create, manage, and update JSON Web Tokens
Create database models in Python and use them with FastAPI routes
Use Alembic to migrate and update databases
Use SQLAlchemy to write functionality to interact with databases in Python
Learn best web development practices and conventions
And much more!
And the best part is; you don't have to know anything about FastAPI, web routing, security, or any of the above. All you need is a basic understanding of Python and some familiarity with HTML and CSS, and you will be on your way to becoming a master of full stack web development in Python and FastAPI!
The curriculum takes a comprehensive look at both FastAPI and the technologies needed to build it. Before we start building any apps, we take a look at the basics of Python, including:
Type hints
Pydantic models
Nuanced Python features that make development much easier, such as virtual environments.
At the end of section, there is a coding exercise and quiz that incorporate all content covered to ensure understanding.
Once the basics are covered, we start by building the first of three full stack web applications. In the first app, we focus on the basics of FastAPI by teaching:
REST API architecture
Jinja2
Bootstrap
HTML templating
The foundational FastAPI skills needed to get a basic application up and running.
Along the way, we will be building a car information viewer that lets you view, search, create, edit, and delete information about cars, all delivered in a clean and readable codebase using Python and FastAPI.
The home page contains a list of all the cars in our database, which is neatly formatted and displayed to the user in a gridlike manner.
The navbar contains working links to the home page, a form to create a car (more on that later!), and an embedded search bar which, when used, takes you to a search page.
The search form uses IDs to search the database for cars, and displays them to the user. It also contains error handling in case an invalid ID is passed to the user.
Each car on the page has edit and delete buttons, with the edit button taking you to an auto-filled form on a separate page to edit the data, and the delete button passing a request to a hidden route that removes it from the database.
The create form is identical to the edit form, except it has no auto-filled data. When completed, it will redirect to the home page, where the newly created car will be available to view.
The second app focuses on web security, incorporating:
OAuth2 flows and schemes
Password hashing
JSON web tokens
FastAPI-specific authentication systems
And industry-standard practices into a main FastAPI application written in Python.
This will be built around a social media feed that uses login and registration functionality to display user information under a protected page.
The home page is available to everyone, and contains some basic text prompting the user to login. The navbar contains links to a login, registration, and logout page, all with custom error messaging to ensure new users are unique and attempted logins are properly authenticated.
The protected page contains data about the user which is displayed in a responsive grid to the user. This displays user information, friends, and notifications.
The logout feature removes any of the authentication applied to the web session and redirects to the homepage.
The third app focuses on databases, using SQLite and SQLAlchemy to build and model databases in Python and FastAPI. You will also learn to use Alembic in combination with SQLAlchemy to perform database migrations and updates.
These topics will be built around a todo list that combines user login with SQLite databases to create a full stack web application, incorporating all the elements of FastAPI, Python, OAuth2, and all the other practices learned up to that point.
Similar to the second app, the homepage is available to everyone and prompts the user to log in.
The login, registration, and logout features use the same FastAPI logic to handle authentication as the previous app, except this time, data is being pulled from a real SQLite database. This is combined with past knowledge to create authentication that works with FastAPI.
The todo page contains a list of all the tasks that pertain to the user. At the bottom of the list is a form that lets you add a new task, which sends a request to a route that handles parsing and adding the task to the user's list of tasks through advanced, FastAPI-specific Python logic.
So, are you ready to start crushing web development and building full stack web applications in FastAPI and Python? Enroll and start your FastAPI journey today!