Comment

Comment by davepeck

I'm excited to see more projects like Rio exploring the full-stack python web dev space. There are definitely categories of users for which the approach makes sense.

---

For me personally -- and I'm guessing for a bunch of other HNers -- writing full-stack web apps strictly in python is a non-goal.

I've settled on a comfortable (for me) stack for smaller projects that need python on the backend that combines:

1. Litestar (or another lightweight HTTP framework of choice like flask, etc.)

2. HTMX

3. htpy.dev (an in-python HTML builder)

4. Custom web components implemented in a plain-old JavaScript ES6 module loaded directly by the browser

A typical project only needs a handful of components. HTMX and htpy.dev both play very nicely with web components.

When I want zero build steps, I write plain JavaScript + JSDoc comments. JSDoc is... okay-ish, but it ain't no typescript.

If I need a database, I'll grab SQLAlchemy. I wish there were a mature lightweight solution here; maybe Tortoise ORM will get there soon?

There's nothing in this stack that couldn't strictly be done in javascript-land. JSX syntax with HTMX is pretty great and much better than any in-python HTML builder. But often my projects have other requirements (like ML) where python is, at least today, inevitable.

parent davepeck 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton