Re:FastHTML – Modern web applications in pure Python
by pelme on Wednesday July 31, 2024 @08:27AM
(#41118622)
htpy recently got a html2htpy command which can convert HTML to htpy code: https://htpy.dev/html2htpy/
I started to couple my FastAPI backend with native Jinja2 templates and noticed that I hate Jinja2 with passion (no disrespect). I tried HTPY which seemed great but this Python abstraction of HTML just felt weird and I found myself converting HTML to HTPY all the time. I even created a GPT for it. Then I found JinjaX and noticed that this hits the nail on the head for me. It's a Jinja2 preprocessor that allows the usage of components instead of the weird extends and macro syntax.
I'm happy to look at FastHTML but I'm not sure what type of benefit I can expect.