How to Create & Deploy a Python Web Application FAST (fastHTML Tutorial)

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต

๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
In this video, we're building a web app from scratch using a new Python package called FastHTML. This digital guestbook lets everyone leave a message, and it's all done without any JavaScript! For the database, we're going to use PostgreSQL from Supabase. To create the web app, it will be helpful if you know some HTML. However, if you are completely new to web development, don't worry. This tutorial will be beginner-friendly. I'll guide you through each step, from installing FastHTML to deploying your web application for free. By the end, you'll have your very own live guestbook on the internet!

#PythonWebApp #FastHTML #PythonProject

I reached out to Matt before releasing the video and asked for permission to โ€œborrowโ€ his idea. Thanks, Matt ๐Ÿ™

๐ŸŒ ๐—Ÿ๐—œ๐—ก๐—ž๐—ฆ:

โญ ๐—ง๐—œ๐— ๐—˜๐—ฆ๐—ง๐—”๐— ๐—ฃ๐—ฆ:
00:00 โ€“ Introduction
00:48 โ€“ Installing FastHTML
01:04 โ€“ Running the Example Code locally
01:38 โ€“ Explaining FastHTML with Example Code
03:45 โ€“ Styling the Application with Pico CSS
04:32 โ€“ Creating a Multi-Page Application
05:08 โ€“ Building the Guestbook Form
10:13 โ€“ Connecting to a Postgres Database with Supabase
12:30 โ€“ Fetching Data from the Database
14:07 โ€“ Inserting New Data into the Database
15:58 โ€“ Handling Form Submissions with FastHTML
17:35 โ€“ Adding a Favicon
17:55 โ€“ Deploying the Web Application to Vercel
20:28 โ€“ Testing the Live Application
20:39 โ€“ Outro

๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ?
If you want to support this channel, you can buy me a coffee here:
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

What types of web apps do you want to build with fastHTML? Let me know in the comments! โคต Cheers, Sven โœŒ

CodingIsFun
ะะฒั‚ะพั€

Very nice tutorial. Just the right amount of detail for a demo project.

KevenWebb
ะะฒั‚ะพั€

๐Ÿ‘๐Ÿฝ๐Ÿ‘๐Ÿฝ awesome demo!

Wait...I thought you were testing out Reflex ahah :D how's the FastHTML experience compared to vanilla FastAPI/HTMX/PicoCSS? and Reflex?

andfanilo
ะะฒั‚ะพั€

A video on portfolio+blog will be great

GenZdev
ะะฒั‚ะพั€

Wow, it's really the same as NextJs, but far simpler. And your tutorial is still amazing as always Sven.

funese
ะะฒั‚ะพั€

Really enjoyed this. Will attempt this during the weekend. May I also know the vscode theme you are using?

IbrahimSaeed-Plus
ะะฒั‚ะพั€

Hi Sven. I really loved FastHTML however I legit have 0 info about HTML. Do you have any video recommendation about learning HTML so that we can build proper fastHTML websites? Thanks!

yazanrisheh
ะะฒั‚ะพั€

Great tutorial Sven! Greetings from your Dutch neighbour.

swoopsavvy
ะะฒั‚ะพั€

My first goal is customer data entry forms. My ultimate goal is a full app with all the things: database, API, local- / offline-first, microservices, event-driven design, document management system, CI/CD... Oh, and I need it to be reasonably secure, too ๐Ÿ˜…

No idea yet, whether FastHTML would be my chosen tool (or one of them), but it certainly has an appeal! I very, very much want to separate the presentation and logic layers. But almost everything else would defer to achieving local- / offline-first, especially without the user needing to install any additional software. So, basically, I'm stuck with the browser, as far as I know.

bc
ะะฒั‚ะพั€

Great tutorial. Can't wait more project with python FastHtml.

WIZURAI-AGV
ะะฒั‚ะพั€

Hi thanks so much. I have a question How does it compare to flask or Django or streamlit

nguyenduyta
ะะฒั‚ะพั€

Thanks for the tutorial. I would have liked to see how or where you learned to code it together in the background or at least mention the resources though. I mean, watching you explain everything is one thing but knowing how to code it and troubleshoot on your own is another e.g. followed along till the supabase database execute() part then an error happened on my end.

drikting
ะะฒั‚ะพั€

Another awesome tutorial sven, can you redesign the streamlit sales dashboard using this framework in the next video?

PrkMEzoo
ะะฒั‚ะพั€

Hello sir, will you please ever make a tutorial on using FastHTML for creating a UI website for machine learning?

Aniket_Pawar
ะะฒั‚ะพั€

Excellent video! Can you create offline web desktop applications with FastHTML? Meaning, the user can simply open a unzipped package with all the files and simply open index.html in his browser and it works just fine (of course ensuring no dependencies that connect to the internet / no APIs...)

carlosz
ะะฒั‚ะพั€

Can you make a video on how to upload python project on dreamhost

WinnerSingh
ะะฒั‚ะพั€

This looks kinda similar to Plotly Dash in terms of using Python to structure HTML. Probably would be easier and better to use raw HTML and htmx or maybe even just simple vanilla js?

prskis
ะะฒั‚ะพั€

Seems overly complex syntax for no reason only good thing would be using python libraries in website I guess

Joex
visit shbcf.ru