Тёмный

Getting started with FastHTML 

Jeremy Howard
Подписаться 123 тыс.
Просмотров 44 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 138   
@TheFocusedCoder
@TheFocusedCoder 2 месяца назад
Wow I’ve waited decades for something like this in python . This is huge
@stalepalemale
@stalepalemale 2 месяца назад
Web dev using Python is not new, theres Python Reflex (which used to be Pynecone) and NiceGUI, Taipy, Streamlit but great to see this new entrant too.
@nerdg2
@nerdg2 2 месяца назад
I have no regrets, learning python finally is about to pay off! I'm a javascript developer and i had enough! Thank you
@DavidBerglund
@DavidBerglund 2 месяца назад
@@nerdg2 it'd be interesting to see if this takes off in a big way. I've had full stack roles before where I had to learn a huge amount of front end technologies just to change some simple things on a website. Despite wanting to build web apps I got so fed up with it that I looked for a way out. Moved to backend with python and later to sysadmin. Running away from the front end and screaming. :P HTMX and FastHTML makes me interested in web dev again.
@nerdg2
@nerdg2 2 месяца назад
​@@DavidBerglund 100% agreed, its like you read my mind. I had to learn tons of new bs just to throw them away after a tiny version update, AngularJS gave me ptsd lol. Svelte was the only sane framework i got to use. I think HTMX coupled with alpinejs should do wonders, i mean whats wrong with VanillaJS, ES6 & ES7 does wonders. I'm about to go full FastAPI and FastHTML on my new startup, i'm a 1000% commited now.
@DavidBerglund
@DavidBerglund 2 месяца назад
@@nerdg2 sounds that it could be a fun place to work :) Good luck!
@alexandermaier2218
@alexandermaier2218 2 месяца назад
Awesome work! Perfect for prototyping and more fast fun projects!
@andreroodt4647
@andreroodt4647 2 месяца назад
I'm not a Python developer, but I love this. I'll be crucified for saying this, but It takes me back 25 years to a time when we streamed HTML from our Java servlets, and JavaScript was something the kids used for scrolling text and popping up banners 🙂. Then, before we knew it, the kids replaced the View in MVC with another nested MVC with its own entire ecosystem, and we "full stack" devs were relegated to the back end.
@andreroodt4647
@andreroodt4647 2 месяца назад
Wow, I sound like a bitter boomer, but I'm not. It's just refreshing to see a simpler alternative to the complexity that is synonymous with front-end development.
@michaelnurse9089
@michaelnurse9089 2 месяца назад
@@andreroodt4647 Nah. You sound fine. Never doubt yourself.
@DavidBerglund
@DavidBerglund 2 месяца назад
​@@michaelnurse9089 "never doubt yourself" is terrible advice 😂 But yes, modern front end dev is amazingly complex and this approach looks very interesting for python devs.
@DavidBerglund
@DavidBerglund 2 месяца назад
I've been hoping that someone built an abstraction on top of HTMX
@thinkerisme4363
@thinkerisme4363 2 месяца назад
great 👍
@aristoi
@aristoi 2 месяца назад
I'm always excited everytime you introduce something new Jeremy. Appreciate you.
@audreyroygreenfeld6972
@audreyroygreenfeld6972 2 месяца назад
Tip: if you get "Internal Server Error" around 31:43 when loading the Todos page, delete todos.db and try again. If that still happens, check carefully which parameters you passed into Todo(). Unlike Titled() which accepts a string by itself as the first argument, Todo() here requires the "title=" named keyword argument.
@MannyBernabe
@MannyBernabe 2 месяца назад
Thanks. Deleted todos.db and re-ran. Fixed.
@yubrshen
@yubrshen 2 месяца назад
Watching closely, the error was introduced when inserting without record id and primary key with the id. Once that is corrected, the insertion will work.
@CodingIsFun
@CodingIsFun 2 месяца назад
*Wow! Amazing work!* 🤩 As a heavy Streamlit user, this looks very interesting and promising. I gotta try it out!
@__________________________6910
@__________________________6910 2 месяца назад
I know you
@JulianHarris
@JulianHarris 2 месяца назад
Server side dynamic web pages with a single file. Now I see why you were challenging the status quo a few months back!
@HarishPillay
@HarishPillay 2 месяца назад
Thanks for posting this, Jeremy. It's a refreshing way to build web apps.
@wilsonusman
@wilsonusman 2 месяца назад
This is game changer for prototyping FAST!
@viorelteodorescu
@viorelteodorescu 2 месяца назад
Excellent idea and contribution to the python world! 😊
@melonkernel
@melonkernel 2 месяца назад
Nice Jeremy! Lovely tutorial for a lovely framework
@bubelevakalisa7313
@bubelevakalisa7313 2 месяца назад
For someone like me who hates JavaScript with passion, this is soooo beautiful👌🏾
@dazraf
@dazraf 2 месяца назад
This is wonderful, thank you Jeremy!
@ravishmahajan9314
@ravishmahajan9314 2 месяца назад
This is good for python community who want to get started with web development using python.
@tamtamresearchs.r.o.5562
@tamtamresearchs.r.o.5562 2 месяца назад
Finally things look simple and clear for how to use Python for authoring HTMX based apps. Very nicely explained with all the responses, local updates, out of band updates etc. On the other hand - I am getting sick from optimization on number of lines of code (one liners for def, if; star imports), breaking PEP8.
@howardjeremyp
@howardjeremyp 2 месяца назад
Actual quote from PEP8: "A Foolish Consistency is the Hobgoblin of Little Minds".
@smibssmibs
@smibssmibs Месяц назад
@@howardjeremyp Quoting Wikipedia: "A hobgoblin is a household spirit ... once considered helpful, but which since the spread of Christianity has often been considered mischievous." Regarding PEP8, I am still in the earlier stage and consider it helpful. Thanks for your work anyway - it strongly simplifies HTMX templating in very creative way and this is helpful too.
@HerroEverynyan
@HerroEverynyan 2 месяца назад
Omg, this is perfection and exactly what I needed! Thanks so much Jeremy & co. Long time fan btw ❤
@TrashallAllsites
@TrashallAllsites Месяц назад
super finally we can prototype application quickly for machine learning Algorithm
@MKBergins
@MKBergins 2 месяца назад
I love this, thank you for making this. I hate HTML, CSS, JavaScript, and mostly familiar with Python and C#. I'm glad I can now finally (hopefully) use Python to make a website. I believe there might be a way to even use the 'fastHTML' page to call on some Django-made pages or other logic, right? Would be awesome to get some more in-depth tech documentation.
@salmanahmed8039
@salmanahmed8039 2 месяца назад
hey jeremy, this is an amazing idea and I can see it going to be a great way of Development in future. Do we have comparisons on response time of FastHTML with others like react?
@howardjeremyp
@howardjeremyp 2 месяца назад
No I haven't done anything like that, because it varies so much based on what you do and how you do it. But for most apps, latency of both react and fasthtml should be low enough to be a non-issue for users.
@fabriai
@fabriai 2 месяца назад
This is extremely good. I’m: reliving the “building a blog in 15 minutes” moment I had many years ago when Rails was presented. But Jeremy is much more charismatic than DHH.
@Quantum_Nebula
@Quantum_Nebula 2 месяца назад
I love this a lot! I am wondering how much customization there is in fastHTML. Do you mind going over some more advanced styling, and/or transitions?
@michaelnurse9089
@michaelnurse9089 2 месяца назад
The default styling options are probably minimal. You can always insert JS elements and so have access to near infinite styling options if that is what you need. Most viewers don't care for fancy styling.
@kora5
@kora5 2 месяца назад
You are using Cursor with its Copilot++, right? Any review?
@FazalKareem-b4e
@FazalKareem-b4e 2 месяца назад
This is really cool! Finally python is paying off. But one concern is that I went to the deployed app from this tutorial and tried using it. The app seemed very slow for a simple to-do list app. It was taking a moment to add or delete new todo. Makes me worry about how slow bigger projects would be.
@simonlauer9379
@simonlauer9379 2 месяца назад
is there support for things like templates? I kind of still like the separation it brings to the table big fan of htmx though
@ryank42301
@ryank42301 2 месяца назад
Fantastic work. Huge thx!
@GeneratedElectricity
@GeneratedElectricity 2 месяца назад
Well I recently learned MERN myself. As a new developer, should I learn this? Because it seems so interesting.
@yannawel
@yannawel 2 месяца назад
Looking forward to getting into it!
@vibhumawasthi
@vibhumawasthi 2 месяца назад
looks great!! I am new to all this, I have learend python for data analysis and also learned fastAPI for backend, can I use it for frontend with fastAPI to create a full stack app?
@howardjeremyp
@howardjeremyp 2 месяца назад
You can use FastHTML for both frontend and backend to create a full stack app :D
@Archibong.samuel
@Archibong.samuel 2 месяца назад
Finally Python has done some remarkable.
@ハェフィシェフ
@ハェフィシェフ 2 месяца назад
25:20 you said you can make the page respond to scrolling or moving the slider. How would you do that?
@invictus56
@invictus56 2 месяца назад
Holy Moly, your webcam is amazing! What are you using?
@howardjeremyp
@howardjeremyp 2 месяца назад
I'm using an iPhone 14.
@chuckinator0
@chuckinator0 2 месяца назад
Does railway have any tools to manage the SQLite database? Backups, etc?
@hcholm
@hcholm 2 месяца назад
Would love to see some kind of bigger reference project with a complex data model, a lot of components, various customisations etc.
@howardjeremyp
@howardjeremyp 2 месяца назад
github.com/AnswerDotAI/fasthtml/blob/main/examples/adv_app.py
@rayallinkh
@rayallinkh 2 месяца назад
is the way it's passing back objects to app through a tuple really scalable? not sure how this works out beyond toy demos
@howardjeremyp
@howardjeremyp 2 месяца назад
Yes, it's more scalable in fact, since you can use the full power of python to refactor. Also the actual size of the html partials sent over the wire are often more compact than json APIs, and the browser has far less work to do -- there isn't a "hydration" process.
@imaginatecstv
@imaginatecstv 2 месяца назад
Well, that's a great overview. Thank you so much!! We use DRF to create rest APIs using Django. And FastAPI to create rest APIs too that can be consumed by any frontend/client for that matter. What's up with this one? Can we do that stuff? If so or not, can you please make a walkthru in that perspective? Or is this like plain-old standalone Django with just templates that serve only HTML with no rest APIs?
@howardjeremyp
@howardjeremyp 2 месяца назад
It's neither of those things -- it's something new! You can do the same stuff that you do with DRF/FastAPI with a js frontend, but you don't need to write any js frontend. There's about a dozen examples and walkthrus in the repo so take a look.
@imaginatecstv
@imaginatecstv 2 месяца назад
@@howardjeremyp Oh god. That's a Triple BAM!!! Lovely one. Will take a look. So indebted for this to you Jeremy❣
@owenlamont4397
@owenlamont4397 2 месяца назад
Curious to learn how this compares to Sameul Colvin's FastUI - similar name and you both seem to be aiming for a similar developer experience of writing low boilerplate web apps purely in Python and you both mention being FastAPI/htmx inspired.
@howardjeremyp
@howardjeremyp 2 месяца назад
FastUI is great, but uses a totally different approach. Try both and see what you like best!
@end1dream
@end1dream 2 месяца назад
Amazing stuff! How would one load Google Maps into a here?
@__________________________6910
@__________________________6910 2 месяца назад
Like Gradio, can we run FastHTML in Google Colab without using ngrok?
@howardjeremyp
@howardjeremyp 2 месяца назад
Not to my knowledge -- or at least I haven't seen that done yet. Gradio has some nifty tricks to make that work that we don't have in FastHTML!
@__________________________6910
@__________________________6910 2 месяца назад
@@howardjeremyp Okay, by the way, FastHTML is great. Even if you only know Python, you can still create websites or web apps with it 🔥
@eitanporat9892
@eitanporat9892 2 месяца назад
hey jeremy how did the html app know to create a Todo item when filling out the form?
@howardjeremyp
@howardjeremyp 2 месяца назад
Great question! It's because the `Todo` type annotation is there. So FastHTML tries to create an object of that type using the named items in the form.
@eitanporat9892
@eitanporat9892 2 месяца назад
​@@howardjeremyp thanks!
@praveenhamal
@praveenhamal Месяц назад
hey how to get input from user? Input("Name",id="username")
@hemanthhvv4296
@hemanthhvv4296 Месяц назад
I'm in thought like this thing (frontend in django is not efficient ) , here comes FASTHtml , that's great
@JohnEgan-k8q
@JohnEgan-k8q 2 месяца назад
thank you Jeremy
@Pete_YT
@Pete_YT 2 месяца назад
Would progressive web app features work with this such as SPA to provide navigation without reloads and access to device features on mobile such as offline storage on device with indexedDB or WebSQL on device?
@watsomk
@watsomk 2 месяца назад
It appears that link in the description mistakenly includes the trailing closed parenthesis.
@howardjeremyp
@howardjeremyp 2 месяца назад
Thanks! Fixed now. I always make that mistake...
@Yeahmansingh
@Yeahmansingh 2 месяца назад
thanks jeremy
@Kevin-hk4fv
@Kevin-hk4fv 2 месяца назад
Amazing!
@jwithy
@jwithy 2 месяца назад
What is the hotkey Jeremy uses to jump from a function to its code? 28:04
@howardjeremyp
@howardjeremyp 2 месяца назад
Hold down cmd or ctrl and click the name.
@maxim_ml
@maxim_ml 2 месяца назад
that's just ctrl+click Do you know what he's using at 20:59?
@jwithy
@jwithy 2 месяца назад
​@@howardjeremyp thank you 🫶...from FastAI to FastHTML I'll be there
@FlowBuddyApp
@FlowBuddyApp 2 месяца назад
Cool thing Jeremy :)
@FlowBuddyApp
@FlowBuddyApp 2 месяца назад
the ) does not escape in the link in the description :D
@tonynguyendtn1984
@tonynguyendtn1984 2 месяца назад
hey guys. i'm an accountant and a python hobbist. are there any resources on the internet on how I can contribute to this project?
@Lily-wp5do
@Lily-wp5do 2 месяца назад
Hi Jeremy, thanks for sharing this. I love it. I try to follow your video but I couldn’t find the todos.db. could you share it? Thanks.
@howardjeremyp
@howardjeremyp 2 месяца назад
It's auto-generated when you run the app.
@abdurahmanayesha608
@abdurahmanayesha608 2 месяца назад
it woud be nice if can use this with fastapi, a python framewor
@booster404
@booster404 2 месяца назад
can this fastHTML mix with tailwind css ??
@howardjeremyp
@howardjeremyp 2 месяца назад
Yup for sure. That FastHTML home page uses tailwind, for instance.
@helloworldcsofficial
@helloworldcsofficial 2 месяца назад
Awesome.
@infraia
@infraia 2 месяца назад
Thanks Jeremy
@frag_it
@frag_it 2 месяца назад
Does this replace flask ?
@howardjeremyp
@howardjeremyp 2 месяца назад
It can do, yes -- whether it's better than flask for your particular needs is something you'll need to try to find out though.
@frag_it
@frag_it 2 месяца назад
@@howardjeremyp thanks looking for something robust to build a full scale production app with the flexibility of css js and html for the frontend and robust flask app for back end applications
@DavidBerglund
@DavidBerglund 2 месяца назад
​@@frag_itthen you're surely not going to pick this brand new shiny thing. Go with Flask/Django/FastAPI+Templates and HTMX. Proven tech. I'm saying this being genuinely excited about FastHTML
@DavidBerglund
@DavidBerglund 2 месяца назад
​@@frag_itmaybe don't jump on a new shiny web framework for a new production app when you can use a more mature framework like Flask or Django with HTMX if you like. I'm excited for the future of this project though. But then again, if this framework let's you build and test and iterate on your ideas quickly. Why not!
@frag_it
@frag_it 2 месяца назад
@@DavidBerglund yes that’s true flask works well but as uy said good for further iteration
@harrycblum6344
@harrycblum6344 2 месяца назад
Cool!
@omlachake2551
@omlachake2551 2 месяца назад
my hx_swap_oob="true" becomes hx-swap:oob="true" when rendered to HTML. And because of that issue the Input field is not cleared. Does anyone know how to solve this issue?
@omlachake2551
@omlachake2551 2 месяца назад
Solved it be passing the attribute as Input(**{'hx-swap-oob': 'true'}). But if anyone could point why this happened, it will a lot.
@sjvonstein
@sjvonstein 2 месяца назад
​@@omlachake2551 without your suggestion, the input box would not clear and the input field was being returned to the end of the list.
@jakemcpeterson
@jakemcpeterson 2 месяца назад
Very cool
@ravishmahajan9314
@ravishmahajan9314 2 месяца назад
In order to have wider adoption of this wonderful library, we need to solid documentation so that people can take it from day one. For now, i am just struggling for get hand on
@nikjs
@nikjs 2 месяца назад
prediction: we may have AI frontend generators that use fasthtml to do the job.
@Femiway_Bunty
@Femiway_Bunty 2 месяца назад
like a better 'figma to code'
@PatrickSteil
@PatrickSteil Месяц назад
Had same idea!
@MyOldNewYork
@MyOldNewYork 2 месяца назад
I love it but wouldn't it be better to make Div, A, P etc. lowercase since Python is mostly written in lowercase and HTML also is lowercase?
@balojey
@balojey 2 месяца назад
Maybe, you don't know! Div and other components are classes and it is a convention in python that all classes name must start with a capital letter. Functions and other variables may be in lowercase but classes must be capitalised. This is a convention and it is not compulsory to adhere to it. However, FastHTML follows this convention which improves the understanding of the project structure by python developers.
@DavidBerglund
@DavidBerglund 2 месяца назад
This bugged me as well. htpy is a package that generates HTML and it uses lowercase. I like how it looks but I'm not sure how complete it is or limiting etc
@mayfield7835
@mayfield7835 2 месяца назад
very nice
@simonsery4450
@simonsery4450 2 месяца назад
This is insane...
@hoopscircle-dj6sk
@hoopscircle-dj6sk 2 месяца назад
This is dooe !!
@mohammadrashid1994
@mohammadrashid1994 Месяц назад
I have been thinking about this idea for quite a while. A very huge first step. Thanks. However we need a neater approach to code interactive web with Python. I would focus on interactivity, component based architecture, existing styling frameworks and browser-Python compatiblity first rather than database and backend. Well done. Wish you best of luck. I'm looking forward for the day where I will use Python for my entire web app with fair confidence.
@riccardomenoli5185
@riccardomenoli5185 2 месяца назад
Does it make sense to use FastHTML as pure frontend that calls an API backend created with FastAPI? I see that here FastHTML is kind of doing both frontend and backend.
@howardjeremyp
@howardjeremyp 2 месяца назад
No it doesn't - FastHTML is designed for hypermedia applications, which is the design we recommend most people use for most projects. If you want to split out the API and deal with the complexity of that approach, then you should use something designed for that.
@BharatKaNamaste
@BharatKaNamaste 2 месяца назад
Its tooo hard😮
@IncompressibleOnboarding
@IncompressibleOnboarding 2 месяца назад
Link includes the right ) FYI
@ioftheneedle
@ioftheneedle 2 месяца назад
Lol was about the write the same.
@avtargill
@avtargill 2 месяца назад
Move FastHTML and break stuff 😤
@SamiSabirIdrissi
@SamiSabirIdrissi 2 месяца назад
5k views in 21hrs 😮
@gw1284
@gw1284 2 месяца назад
Awesome, tutorial, How to 1) incorporate Login 2) integrate with a react component? Thanks
@Larimuss
@Larimuss 2 месяца назад
Really cool idea. I think with more work and simplified commands could be great. Right now, it's probably good for pythons devs for small projects but not something I'd expect to see in many production sites. Code seems just as complex as righting out the html. Especially with all the tools available now. Html5 is super simple.
@sigmaroll9802
@sigmaroll9802 2 месяца назад
Calc!
@i_youtube_
@i_youtube_ 2 месяца назад
Side question: As a beginner, what do I need to learn to contribute to this project? I know python and web development. Still I didn't learn git and other things.
@bossgd100
@bossgd100 2 месяца назад
Are u using mojo to run it ?
@eitanporat9892
@eitanporat9892 2 месяца назад
mojo is a new programming language for performant parallel applications running on gpus, it's not related to webdev.
@bossgd100
@bossgd100 2 месяца назад
@@eitanporat9892 thank you, it's more clear now
@pookiepats
@pookiepats 2 месяца назад
Too bad it’s in py
@edwinquaihoi8503
@edwinquaihoi8503 2 месяца назад
I am sorry but this is a rehash of the past, trying to abstract away the web (HTML & JavaScript) with a programming logic failed many years ago and here we are again.
Далее
Python Django Web Framework - Full Course for Beginners
3:45:41
From React To HTMX
40:01
Просмотров 334 тыс.
aespa 에스파 'Whiplash' MV
03:11
Просмотров 30 млн
C Programming Tutorial for Beginners
3:46:13
Просмотров 13 млн
Data Analysis with Python for Excel Users - Full Course
3:57:46
NixOS Setup Guide - Configuration / Home-Manager / Flakes
3:01:39
*Next-door 10x Software Engineer* [FULL]
4:50
Просмотров 725 тыс.
Front-end web development is changing, quickly
3:43
Просмотров 1,2 млн