Live data from Hacker News

FastHTML – Modern web applications in pure Python

fastht.ml

41–50 of 229 posts

Re: FastHTML – Modern web applications in pure Python

#42
This looks really cool. I have experience with shiny apps in R, and Python has a shiny package too now. FastHTML looks a lot like Python shiny without routes. I think both of these frameworks are great for people with no web dev experience. It would be great if there is some discussion of htmx and why it is used in the tutorials section of FastHTML docs.

Re: FastHTML – Modern web applications in pure Python

#43

This looks really cool. I have experience with shiny apps in R, and Python has a shiny package too now. FastHTML looks a lot like Python shiny without routes. I think both of these frameworks are great for people with no web dev experience. It would be great if there is some discussion of htmx and why it is used in the tutorials section of FastHTML docs.

Shiny and FastHTML are both built on top of Starlette, so both use the same routing implementation. FastHTML by default uses a `RouteX` subclass that adds quite a bit of functionality to Starlette routes (mainly around automatically passing in the needed parameters for a handler).

There's quite a bit of background of why HTMX is used, particularly these two sections of about.fastht.ml:

- https://about.fastht.ml/foundation#sec2

- https://about.fastht.ml/tech#sec2

Re: FastHTML – Modern web applications in pure Python

#45

This looks really nice. I'm just wondering how it would combine with Pyscript, which I've been watching for a good while now. As a primarily Python user wanting to do some web dev, I'd rather not touch JS/TS at all, beyond importing 3p packages.

I doubt you'd need pyscript with this. Pyscript uses WASM in the browser, whereas FastHTML uses Python on the server directly -- the FastHTML approach avoids the need for your phone/laptop to download an entire python implementation just to use a web page!

Re: FastHTML – Modern web applications in pure Python

#46

Not a very good "ad" as your page is quite slow and skips many frames, especially when scrolling past "The fastest way to create a real web application." "Fast"

I'm not seeing that. What browser/device are you using?

The interactivity on the home page is just using Tailwind. I don't see why it would be slow for you (other than that the site is quite visually complex, so it naturally requires some baseline level of performance on your device).

Re: FastHTML – Modern web applications in pure Python

#47

Did you try Reflex.dev? Any opinions on it?

Reflex converts the Python code into a react frontend and fastapi backend. It's an abstraction that hides much of the underlying foundation, which is a very differently philosophy to FastHTML -- which endeavors to make the underlying foundation directly available.

Personally I wanted to create something that made the foundations of the web more directly available to Python programmers, rather than hiding it behind multiple layers of abstraction. Reflex is very impressive though, and I expect for some types of app it might be a better choice; probably worth trying out both!

Re: FastHTML – Modern web applications in pure Python

#48
Came here to post this but HN hivemind beat me to it. Can't stress this enough. This Coupled with generative AI for code generation will make the barrier to entry sure low. Time to migrate my bootstrapped Flask/JINJA2 templates website(www.voxtodo.com) to this shiny new.

Re: FastHTML – Modern web applications in pure Python

#49
Look very nice, I love simplicity. Wondering how it would scale in real life - game of pi example feels slow.

Is it possible to mix it with gradio? E.g. Make most of layout and UI in fastHTML but reuse some complex high level components from gradio?

Post reply on HN