Hacker News new | ask | show | jobs
by hunvreus 263 days ago
I believe I checked FastHX while building it, but wasn't clear what the main advantage was. Can you help me understand what problems I'd solve with it?
1 comments

It's just sugar.

It hides the manual template selection, context creation, and rendering logic behind a simple decorator. This way you always write standard FastAPI routes (or you add HTML rendering to existing JSON APIs without changing the route or breaking the existing functionality).

With htmy, it does a bit more, like adding some utilities to the rendering context, adding context processor support, simplify rendering, letting you statically check whether your components receive the correct properties.