FastAPI has rapidly emerged as a leading option in the Python web development landscape. According to the 2020 PSF developer survey, FastAPI ascended from obscurity to become the 3rd most popular and fastest-growing framework for Python developers. This trend highlights FastAPI's efficient toolchain for creating robust APIs. However, some developers question if a supplementary framework like Flask or Django is necessary for handling the HTML segment of their application.
This course is designed to dispel that uncertainty. FastAPI stands out as an exceptional choice for crafting HTML-oriented content and static web assets. In this course, you will discover how to develop comprehensive web applications using FastAPI, rivaling what you can accomplish with Flask or Django. FastAPI offers a plethora of features, often surpassing those provided by its more established counterparts.
Why Choose FastAPI for Full Web Applications?
Currently, there are few educational resources centered on the FastAPI web framework. Most existing courses focus primarily on API development. Although this is valuable, a crucial question remains: Do you need another web framework like Flask or Django for browser-based interactions? The clear answer is no.
FastAPI is a modern framework that smoothly integrates dynamic HTML templates, comparable to Flask's capabilities. This course will guide you through the various features of FastAPI alongside additional external packages necessary to create exquisite Python web applications.
Course Overview
Project: PyPI.org Clone
As part of the curriculum, we will build a near-complete clone of pypi.org using FastAPI. In this process, you'll gain proficiency in utilizing SQLAlchemy, managing HTML templates, serving static files, and deploying your application to a Linux VM in the cloud.
Key Topics Covered
This course encompasses all essential aspects for developing, operating, and deploying full web applications using FastAPI. Key topics include:
- Building a basic FastAPI application
- Utilizing server-side dynamic HTML templates like Jinja2 and Chameleon
- Centralizing design elements with a layout HTML template
- Serving static files such as images and CSS from FastAPI
- Implementing the view model design pattern for efficient data exchange in FastAPI
- Creating HTML forms with user input and validation mechanisms
- Persisting data using the SQLAlchemy ORM
- Taking advantage of SQLAlchemy's new async/await API to enhance scalability
- Deploying your FastAPI application to a Linux cloud VM