dcreater 1 day ago

Is there a comparison or guide to choosing python frameworks? Every few weeks there's a new one posted here

3
eyegor 1 day ago

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/

fermigier 1 day ago

Not a comparison, but a fairly comprehensive list that I maintain, with github stars as a proxy for popularity:

https://github.com/sfermigier/awesome-python-web-frameworks

Note: as you probably know, popularity is not necessarily correlated with "actively maintained". For instance, Hug and Sanic are quite popular, but haven't seen a commit for quite a long time.

devjab 1 day ago

I think the “rule of thumb” is that none of them are better than using HTMX with templates. HTMX obviously having some limits in terms of security and complex REBAC.

anentropic 1 day ago

HTMX + templates are complementary to a backend framework rather than an alternative to one

LaundroMat 1 day ago

Or Unpoly. I've been working with it for a month now and it's a real pity such a robust library it gets so little attention.