Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…
FastHTML – Modern web applications in pure Python
71–80 of 229 posts
Re: FastHTML – Modern web applications in pure Python
#72Are there any UI libraries developed for this? Or other ecosystem stuff.
Re: FastHTML – Modern web applications in pure Python
#73One check I always like to do with a new Python-based framework is this - does it support the creation of a dynamic number of components at runtime, AND each having their own component state? Most frameworks I've tried support one or the other, but not both. Is there an example that demonstrates something like this in FastHTML - user provides a number n at runtime, n cards are generated, each card has its own text fi…
Re: FastHTML – Modern web applications in pure Python
#74Sorry, but I hate server-side "helper" functions that generate HTML. For one thing it's never the same as what eventually gets shown on the page. 99.9% of the time you're missing attributes when needs to be hacked around. Debugging is a nightmare. Refactoring is hell. And css programmers have no clue what to do with this. Maybe I'm missing something here. Why not a templating engine?
In this case, it's a 1:1 mapping to what's on the page, so your concern doesn't apply here. Debugging and refactoring is far easier with Python functions than templates, and CSS programmers just use CSS the usual way. To answer your question, I'll quote from https://about.fasht.ml : Templates were originally created for web development in the 1990s, back when web design required complex browser-specific HTML. By usin…
Re: FastHTML – Modern web applications in pure Python
#75Python is fast compared to something? Maybe fast enough to generate HTML.
https://www.tiobe.com/tiobe-index/
But, we can play the benchmark game, if that tops your morning cereal.
Competes with Go. Blows most popular TS frameworks out of the water.
https://www.techempower.com/benchmarks/#section=data-r22&hw=...
For you: https://gprivate.com/6chku
Re: FastHTML – Modern web applications in pure Python
#76Nice work! I think the Python community definitely needs something like this. The thought never occurred to me to use HTMX w/Python for both server rendered HTML and dynamic behavior in the browser. I have a few questions for you. 1. Why do you recommend conda or pip and not uv? Is this because the plug and play deployment platforms are configured to use pip? 2. Do you plan to make this “batteries included” like Djan…
Re: FastHTML – Modern web applications in pure Python
#77Re: FastHTML – Modern web applications in pure Python
#78This is not the way to do html with python.
Maybe expand a bit on why it's not? Otherwise this is a useless troll comment.
Re: FastHTML – Modern web applications in pure Python
#79Frameworks like this are really next-gen, but I wish people would think in terms of the bigger Python ecosystem and not just their own framework. This is about the fifth web framework which are not compatible with each other: Streamlit, ReactPy, FastHTML, Dash, Shiny, etc.. I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web fra…
I'd love to help you with documentation and such; hit me up at smart.tent1246@fastmail.com if you'd like a partner(:
[1] https://github.com/tvst/htbuilder
EDIT: Actually, scrolling further in this thread, it looks like https://htpy.dev fits the bill? It has explicit integration with Django, which is what I was looking for.