Live data from Hacker News

Rio: Web apps in pure Python

github.com

111–120 of 205 posts

Re: Rio: Web apps in pure Python

#111
post #87

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. Lite…

> 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? [Peewee ORM]( https://docs.peewee-orm.com/ )

Peewee never quite got there IMO, and it hasn't kept up with the times (modern asyncio, etc.)

Re: Rio: Web apps in pure Python

#113
I am definitely target audience for this.

I am often in need of building internal tools, dashboards - simple apps with simple UI that doesn't need to be unique, drive engagement, or whatever. It needs to get the job done and let me move on.

Streamlit is close but the peculiar approach they take (rerun the script) makes it unwieldly for more complex apps (say, a few related pages, a few dozen components each).

I've been looking for a way to just let me do "GUI app in Python" that get delivered over HTTP and rendered in browser, and Rio is exactly what I was hoping for.

Yeah, no chance Meta will rewrite FB frontend to use Rio. Also pretty sure that I won't be doing any fancy websites in it. But if I can skip dealing with React/Vue/HTMX/whatever on the frontend for some internal thingy.

I only tried doing some simple stuff but so far I really like what I see!

Re: Rio: Web apps in pure Python

#114
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

With tailwind people aren't writing CSS anyway (technically)

Re: Rio: Web apps in pure Python

#116
post #80

Earlier quoted context omitted.

IMO you either need to go all in or not at all. And by all in I mean your "web page" is nothing but a tag and your non-web framework is handling basically everything. It's an unholy nightmare for many reasons but it would at least allow you to make a reliable self-contained system. "We'll take your native constructs and jimmy them into some bastardized HTML" is almost always full of razor-sharp edge cases.

Agreed! And indeed we are still considering switching Rio to a Canvas + WebGL/WebGPU. The reason we've decided against it for now is accessibility, and weird edge cases such as Copy & Pasting.

What about text rendering?

Apart from native a11y, hackability/"DX" and affordances like text selection, I feel that text rendering is a big moat of classic web technologies.

Re: Rio: Web apps in pure Python

#117
post #12

This kind "you don't need JavaScript, HTML and CSS" approach always fails flat. We already went down this route several times since the first dotcom wave and all the frameworks that tried to target the browser as if we don't need to know "JavaScript, HTML and CSS". Until we need to debug the application, or why it isn't rendering as it should. It is also why I am not a big fan of Blazor, even though I admire its engi…

Remember GWT? I sure do.

Apache Wicket

Re: Rio: Web apps in pure Python

#118

Earlier quoted context omitted.

As developers/engineers we love to solve problems. Too many times though we mislabel "friction" as "problem" and then start trying to solve the friction based on our current skill set or viewpoint. So frontend devs feel friction working backend and vice versa leading to all sorts of efforts like this that mostly fail. Good luck though :)

This kind of framework isn’t targeted towards frontend devs though. It is targeted towards backend devs who want to make frontends easier.

That's why they said "vice versa".

Re: Rio: Web apps in pure Python

#119

These frameworks are cute, and I understand the desire to avoid the modern SPA JavaScript build systems, but it always seems like so much more work than just writing HTML. I swear, HTML/CSS + Flask + HTMX gets you so far these days. Then, you can throw in some AlpineJS for any inter-element interaction you need and build a responsive SPA without almost any JavaScript.

Flask + HTMX + AlpineJS always seem like so much more work than just writing JavaScript.

All of it is so much more work compared to PHP + HTML + CSS (and no JS).

Re: Rio: Web apps in pure Python

#120
post #83

It's a bit sad that most of the comments here are negative. Most of them seem to be some variation of, "Nobody needs a tool like this, all you have to do is simply dedicate yourself to multiple years of writing corporate CRUD apps in both vanilla soul-crushing Javascript and web frameworks. You know, like I did." So, I am the target audience of this. I have a LOT of experience writing tools and automation and that is…

Ok that's great. I guess I'm just skeptical you won't have to either A. Settle for premade layouts B. Learn some CSS like specification of custom styles. And that is where you get sucked into the rabbit hole

> Settle for premade layouts

Just think of how many man years we could have saved if we did this.

Post reply on HN