Htmy – Async, pure-Python rendering engine
volfpeter.github.io
Htmy – Async, pure-Python rendering engine
1–10 of 90 posts
Re: Htmy – Async, pure-Python rendering engine
#2Looks great. Anyone using this in production?
Re: Htmy – Async, pure-Python rendering engine
#3How does this compare with FastHTML?
Re: Htmy – Async, pure-Python rendering engine
#4Would love to see some benchmarks for all these libraries that compare them to Jinja2.
Re: Htmy – Async, pure-Python rendering engine
#5I was looking for something like this a few weeks ago. I typically use Django and hate the template engines limitations. I needed to make some reusable components and the best option available was switching to jinja to get their macro support, bleh.
This reminds me of the best part of Flutter UI composition, but in a language I always return to.
Have you done any benchmarking? I don't even know what the comparison would be.
Re: Htmy – Async, pure-Python rendering engine
#6Is there a comparison or guide to choosing python frameworks? Every few weeks there's a new one posted here
Re: Htmy – Async, pure-Python rendering engine
#7There's a bunch of these kinds of html renderers. Here's mine:
https://pypi.org/project/simple-html/
But there are many others. Not sure I understand the point of async rendering, unless you want to mix IO with rendering? Which feels a bit too close to old PHP+html for my blood.
Re: Htmy – Async, pure-Python rendering engine
#8Not clear why HTML rendering needed to be infected with async. None of the example code has a clear need for async - even the `is_admin()` method would be a prefetched property in any reasonable database model.
Re: Htmy – Async, pure-Python rendering engine
#9Looks similar to a framework I've been using for some personal sites reflex.dev, pretty cool when would you recommend using this over that?
Re: Htmy – Async, pure-Python rendering engine
#10Is there a comparison or guide to choosing python frameworks? Every few weeks there's a new one posted here
In the real world, for web things, people use django or fastapi. I'd suggest picking a project with lots of stackoverflow questions and poking around their docs to see which makes you the most comfortable. Personally I tend to favor litestar these days since it has good docs and issues don't sit around for years waiting on one dude to merge prs (fastapi) and it's a lot nicer than django (and I hate django docs).
Flask/quart are painful to work with due to horrible documentation in my experience, but they're popular too. Quart is just an async rewrite of flask by the same owners.
Litestar has a half baked comparison chart here: https://docs.litestar.dev/latest/