Live data from Hacker News

Htmy – Async, pure-Python rendering engine

volfpeter.github.io

1–10 of 90 posts

Re: Htmy – Async, pure-Python rendering engine

#5
I 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

#7
There'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

#10
post #6

Is 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/

Post reply on HN