While the design of it violates the separation of concern principle (keep data and code separate), I have to say this is most impressive, thanks for writing and sharing it. I have always been reluctant to accept any boilerplate code (esp. such that one cannot fully understand) in my codebase, and this does not have ANY! All the sample code looks absolutely beautiful, so I will give this a try for my next Web app proj…
FastHTML – Modern web applications in pure Python
51–60 of 229 posts
Re: FastHTML – Modern web applications in pure Python
#52I created a truly reusable Python component framework which is just a a string generation library and can be used for ANY existing Python web framework and even more: HTML, XML, RSS, SVG generation, even robots.txt generation as a silly example. I use it with Django and HTMX but it doesn't have an opinion about anything how should you use it. If you pass a Component to Django HttpResponse instead of a string or template, it just works.
I guess I should just write some documentation and release it before the 6th one of these appears :) so we ALL can collaborate with the same API on a bunch of Component sets like Twitter Bootstrap or Material components!
Re: FastHTML – Modern web applications in pure Python
#53Re: FastHTML – Modern web applications in pure Python
#54Re: FastHTML – Modern web applications in pure Python
#55Re: FastHTML – Modern web applications in pure Python
#56Re: FastHTML – Modern web applications in pure Python
#57Readability, reusability ... the list goes on.
Re: FastHTML – Modern web applications in pure Python
#58I think this is a very useful framework to write about on Wikipedia on how not to use HTML in your python code. There's a canonical reason on why we shouldn't. Readability, reusability ... the list goes on.
From what I understand is this adds JS bindings.
Re: FastHTML – Modern web applications in pure Python
#59Re: FastHTML – Modern web applications in pure Python
#60Python is fast compared to something? Maybe fast enough to generate HTML.