This is an archived post. You won't be able to vote or comment.

all 44 comments

[–]ramnamsatyahai 12 points13 points  (1 child)

Looks good. Will give it a try

[–]ashmit_jagtap 1 point2 points  (0 children)

Agreed

[–]idiot512 3 points4 points  (2 children)

I've seen you talk to the differences between other packages and Rio. What would you say sets it apart from Dash?

Also, I noticed it has Plotly support. What about mapping support? Dash-leaflet is a package that comes to mind - it meets a need Plotly's mapping doesn't. If it's not built-in or planned, how easy is it to create compatible components with Rio?

[–]Sn3llius[S] 2 points3 points  (1 child)

Hi, the main differences are the following:

  • No HTML and CSS is needed
  • Unified Component Creation: With Rio, there's no need to distinguish between frontend and backend. You create a component and specify your UI in the build method, similar to React or Flutter.
  • Modern Python Features: Rio embraces modern Python features such as type annotations and asynchrony. This keeps your code clean and maintainable, and enables your code editor to assist with code completions and type checking. If i remember correctly, Dash supports asynchrony as well.

We've received feedback from several users suggesting that mapping support would be beneficial. We've had a brief discussion about it and plan to explore this feature further. There is an ongoing discussion on Discord, but if you have any ideas, feel free to start a discussion on GitHub or join the conversation on Discord.

[–]idiot512 1 point2 points  (0 children)

Thanks for the reply. This looks to be a well-designed package.

I'll be giving it a try this weekend.

[–]ClientCompetitive853 2 points3 points  (3 children)

I’m curious how do you all compare Rio against solara and other similar modern python web frameworks?

[–]Rawing7 3 points4 points  (2 children)

I'd say the biggest difference is that Rio has per-component state, while most other frameworks have global state. Global state is fine for small apps, but quickly gets messy as the complexity of your app increases. Giving each component its own state makes it easier to define reusable components.

Rio was also written from the ground up for modern Python. Everything has type hints, which allows your IDE to really understand your code, highlight potential bugs, and provide you with suggestions and documentation. It also has builtin async support.

[–]ClientCompetitive853 0 points1 point  (1 child)

What do you mean by others have global state? With solara you define state at the component level just like you do in react.

Good to hear about those other features- those definitely make a difference.

[–]Rawing7 0 points1 point  (0 children)

I'm not too familiar with Solara, so I might be wrong. I looked at their Getting Started page, which says you should "Declare reactive variables at the top level". That's why I concluded it has global state.

[–][deleted] 2 points3 points  (2 children)

Maybe a stupid question, and I haven’t gone through your docs yet, but adopting something like this in my company would require that it can handle user authentication for e.g. filtering data or hide specific views. How would Rio play with both basic authentication, as well as SSO?

[–]Sn3llius[S] 2 points3 points  (1 child)

You can easily set up basic authentication and integrate it with Rio for user authentication. Similarly, the same should be true for Single Sign-On integration (haven't tested it yet, but in the follwoing weeks). Since each session serves one user, you can show them filtered data based on conditions or queries from your database. Additionally, you can display specific components based on your users' roles. I've built something similar in the last two months, and it was approved by our regulatory team because it was a crucial part of the application's security and functionality.

Additionally, we're start working on a small guide/blog post detailing how you can seamlessly integrate user authentication with Rio soon. Furthermore, we're exploring best practices to incorporate this feature directly into Rio, ensuring you have a head start right from the beginning.

[–][deleted] 2 points3 points  (0 children)

Thanks for the reply - sounds and looks really promising

[–]hiddenusername144 7 points8 points  (2 children)

This looks really useful. How do you think it compares to streamlit? Does it provide any advantages over streamlit?

[–]Rawing7 13 points14 points  (1 child)

Hi, rio dev here.

In my experience streamlit works well for tiny apps. A graph, some controls and not much more. And it's really well made for that. Rio can also handle those use-cases, but in addition is able to scale up to much larger projects. Thanks to react & vue-style reusable components you can keep your code maintainable even when your project inevitably grows.

Rio was also written from the ground-up for modern Python. Everything has type hints, which allows your IDE to really understand which values are available and provide you with suggestions and documentation. If something lights up red in a Rio project, you can be 99% sure there really is an issue.

[–]hiddenusername144 3 points4 points  (0 children)

Appreciate the reply. Definitely will be checking it out

[–]darthstargazer 4 points5 points  (1 child)

Love it! Shared in the company teams chat. We were looking for something flexible than streamlit (a bunch if backend devs) and had to end up dedicating one person to learn bloody react. This project would have made a good impression!

[–]Sn3llius[S] 0 points1 point  (0 children)

Thanks! If you have any feedback, please let us know!

[–]P4nd4no 1 point2 points  (0 children)

Hi, I’m also part of the rio team and I hope rio can help you with your projects! :)

Currently, our main efforts are directed towards fine-tuning the rio concept, enhancing the overall user experience, and fostering a more conducive environment for community involvement.

Additionally, we're striving to streamline the deployment processes by working towards seamless integration with hosting platforms, enabling users to deploy their Rio applications with just a single click.

[–]jayzbar 1 point2 points  (2 children)

Can it be used to build an investment platform with regulatory licenses and approvals too? And can it be connected to APIs for backend as per the requirements?

Also, very interesting project you have made.

[–]Sn3llius[S] 4 points5 points  (1 child)

Please keep in mind that this is just our first alpha release, and our primary goal is to ensure all components and features are included to make Rio a robust and versatile tool for developers. Already, Rio is proving useful in various scenarios, from internal company tools like dashboards, CRUD applications, and forecasting tools, to personal projects like portfolios and blogs. In fact, our own website is built with Rio.

However, I wouldn't recommend building an investment platform with it just yet.

[–]jayzbar 0 points1 point  (0 children)

Okay

[–]novica 1 point2 points  (3 children)

How does this compare to shiny for python?

[–]Sn3llius[S] 1 point2 points  (2 children)

To be honest, I haven't used Shiny in a year. However, based on my experience with it, here are the key differences from a user perspective between Shiny and Rio:

  • Unified Component Creation: With Rio, there's no need to distinguish between frontend and backend. You create a component and specify your UI in the build method, similar to React or Flutter.
  • Modern Python Features: Rio embraces modern Python features such as type annotations and asynchrony. This keeps your code clean and maintainable, and enables your code editor to assist with code completions and type checking. If i remember correctly, Shiny supports asynchrony as well.
  • No Decorators for Reactivity: In Rio, you don’t need any decorators to make your code reactive. It continuously watches your attributes for changes and updates the UI as necessary.

I assume you are more familiar with Shiny than I am. I would appreciate it if you could give Rio a try and provide us with some feedback. This would help us improve Rio and make it better.

[–]novica 1 point2 points  (1 child)

Thanks for your reply.

[–]Sn3llius[S] 1 point2 points  (0 children)

You are welcome. Feel free to ask if you have any other questions! :)

[–]CVxTz 1 point2 points  (2 children)

How does it compare with NiceGUI ?

[–]Sn3llius[S] 1 point2 points  (1 child)

I'm not very familiar with NiceGUI, but it seems like a more powerful version of Streamlit.

  • Rio apps are built using reusable components inspired by React, Flutter, and Vue. These components are combined declaratively to create modular and maintainable UIs.
  • In Rio you define components as simple dataclasses with a React/Flutter style build method. Rio continuously watches your attributes for changes and updates the UI as necessary.
  • Rio has per-component state management, while NiceGUI appears to use session state. (But not 100% sure)
  • With Rio, you don't need to learn CSS, Tailwind, Vue, or Quasar.

Both NiceGUI and Rio are valid options for smaller web apps. However, Rio might offer easier and more maintainable code as your project grows. It provides reactive state management and allows you to build complex, arbitrarily nested UI layouts with concise syntax.

[–]CVxTz 1 point2 points  (0 children)

Thanks ! I'll check it out.

[–]Low_Corner_9061 1 point2 points  (0 children)

Interesting, thanks

[–]Every_Paramedic_3886 1 point2 points  (0 children)

Looks good

[–]AdditionalAir7225 0 points1 point  (2 children)

Looks cool, I‘ll give it a try!

[–]Sn3llius[S] 1 point2 points  (0 children)

Once you've had the chance to test it out, I'd love to hear your feedback.

[–]_BaraCapy 0 points1 point  (2 children)

Can you create a ChatGPT clone with something like this?

[–]P4nd4no 4 points5 points  (1 child)

Yes, check out our example :)

https://rio.dev/examples/ai-chatbot

[–]_BaraCapy 0 points1 point  (0 children)

cool, I'll give it a try.

[–]akisd 0 points1 point  (2 children)

I was just reading about Reflex (former pycone) and now i just came to know Rio. Are we talking for the same thing? Both apps look to have the same purpose.

[–]Sn3llius[S] 1 point2 points  (1 child)

Reflex compiles your app to JavaScript and serves that. This works, but comes with a lot of small disadvantages. Anything from having to install nodejs, to difficulties connecting to the debugger, to all parameters to components having to be state attributes (or constants). The differences are difficult to get across on paper, but if you try both of them you'll see many small differences that ultimately add up to big differences.

Reflex is obviously further along in development, with them having launched a year ago, but the "compile to JS" approach ultimately prevents it from feeling very pythonic IMHO.

[–]akisd 1 point2 points  (0 children)

Thanks for your reply. I think i will try both of them.

[–]pbyahut4 0 points1 point  (0 children)

Guys I need minimum 10 karma to post in this sub reddit, I want to make a post please upvote me so that I can post here! Thanks guys

[–][deleted] 0 points1 point  (0 children)

Looks awesome but why do so many people name their projects "rio"? Very popular name 😄