Skip to main content

Full Web Apps with FastAPI

7h 12m 4s
English
Paid

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

About the Author: Talkpython

Talkpython thumbnail
Talk Python to Me is a weekly podcast hosted by Michael Kennedy. The show covers a wide array of Python topics as well as many related topics (e.g. MongoDB, AngularJS, DevOps).

Watch Online 117 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 117 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: 01-welcome-apis-or-webapps
All Course Lessons (117)
#Lesson TitleDurationAccess
1
01-welcome-apis-or-webapps Demo
03:02
2
02-fastapi-compared
03:01
3
03-big-ideas-covered-in-the-course
03:18
4
04-student-expectations
00:59
5
05-what-are-we-going-to-build
01:15
6
06-your-instructor-michael-kennedy
00:40
7
07-get-the-full-story-on-fastapi
00:37
8
01-have-python
03:10
9
02-editor
02:32
10
03-git-the-source-code
01:15
11
01-chapter-intro
01:43
12
02-creating-the-python-project
04:10
13
03-basic-fastapi-app
05:14
14
04-ready-for-production
02:32
15
01-template-intro
01:14
16
02-rendering-basic-html
04:08
17
03-template-languages-compared
01:30
18
04-template-languages-a-comparison
06:23
19
05-rendering-basic-html-template
06:28
20
06-organizing-view-methods
11:17
21
07-concept-shared-layout
02:25
22
08-shared-layout
06:14
23
09-static-files
03:53
24
10-real-layout
04:01
25
11-real-home-page
05:43
26
01-viewmodels-chapter-intro
01:44
27
02-view-model-pattern
03:41
28
03-adding-view-model-to-the-home-view
08:45
29
04-services-for-viewmodel
03:41
30
05-a-few-more-viewmodels-to-create
03:09
31
06-survey-the-package-details-page
01:08
32
07-adding-html-for-details
03:44
33
08-create-the-package-and-release-classes
07:58
34
09-view-models-everywhere
04:51
35
01-intro-to-chapter
00:50
36
02-a-basic-user-class
01:47
37
03-get-post-redirect
03:03
38
04-get-post-redirect-for-registration
05:36
39
05-recieving-registration-data-with-viewmodel
07:09
40
06-redirecting-after-registration
03:40
41
07-clientside-validation
03:56
42
08-logging-in-via-cookies
05:51
43
09-logging-in-via-cookies-safer
03:27
44
10-logging-out
01:24
45
11-login-basic-edition
03:12
46
01-intro-to-sqlalchemy-chapter
02:15
47
02-need-to-learn-sqlalchemy-see-the-appendix
02:06
48
03-which-version-of-sqlalchemy
04:06
49
04-sqlalchemy-session-setup
09:20
50
05-user-sqlalchemy-class
07:20
51
06-package-and-releases-sqlalchemy-classes
05:29
52
07-populating-the-db
04:49
53
08-home-page-queries
07:11
54
09-package-details-queries
02:54
55
10-latest-release-for-package
01:35
56
11-user-queries
07:28
57
12-storing-the-password-securely
06:47
58
01-intro-to-chapter
01:32
59
02-beta-software-see-revisions-doc
01:45
60
03-async-for-scalability-sync-version
04:52
61
04-async-for-scalability-async-version
01:42
62
05-updating-the-db-session-for-async
03:43
63
06-user-service-async-queries
07:47
64
07-find-user-by
04:25
65
08-async-create-account
02:04
66
09-async-login-user
03:42
67
10-the-remaining-db-queries
07:40
68
01-deployment-extra-intro
02:06
69
02-beware-of-the-docs
04:29
70
02-surveying-some-hosting-options
05:50
71
03-create-a-server-at-digital-ocean
03:51
72
04-connecting-to-and-patching-our-server
02:04
73
05-server-topology-with-gunicorn
03:18
74
06-adding-ohmyzsh
01:11
75
07-preparing-to-run-fastapi
03:37
76
08-getting-the-source
04:16
77
09-venv-always
01:13
78
10-gunicorn-as-systemd-unit
04:13
79
11-installing-and-running-nginx
03:30
80
12-adding-ssl-for-https
02:05
81
01-conclusion
01:13
82
02-our-first-site-a-minimal-website
02:23
83
03-template-languages
02:00
84
04-viewmodel-pattern
02:17
85
05-get-post-redirect-pattern
01:56
86
06-sqlalchemy-models
02:00
87
07-async-await
02:11
88
08-deployment
02:01
89
09-thanks-and-bye
00:26
90
01-introducing-sqlalchemy
04:07
91
02-who-uses-sqlalchemy
01:35
92
03-architectue
02:14
93
04-demo-the-db-model
03:11
94
05-modeling-packages
08:31
95
06-sqlalchemy-base-class
01:52
96
07-database-connection
06:01
97
08-creating-the-tables
06:27
98
09-indexes
05:01
99
10-the-other-tables
04:25
100
11-relationships
07:17
101
12-modeling-concepts
04:15
102
01-creating-the-basic-insert-script
02:19
103
02-connecting-to-the-db-again
01:36
104
03-setting-package-values
01:34
105
04-saving-the-package-to-the-db
03:37
106
05-running-the-inserts
02:35
107
06-adding-types-to-the-session-factory
01:21
108
07-inserting-the-actual-data
05:09
109
08-concept-unit-of-work
02:23
110
09-querying-data-home-page
05:55
111
10-latest-releases
09:04
112
11-package-details
09:19
113
12-concept-querying-data
04:03
114
13-concept-ordering
00:45
115
14-concept-updates
00:49
116
15-concept-relationships
02:00
117
16-concept-inserting-data
00:37
Unlock unlimited learning

Get instant access to all 116 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription