Hacker News new | ask | show | jobs
by queens_ridge 1119 days ago
Interesting. I wonder how it compares to Voila. What I like about Voila is that you can use ipywidgets natively and then render Jupyter Notebooks directly to a web-app. Maybe this will be a decent competitor.
4 comments

Co-creator of Voila here. Voila is rather un-opinionated about what you can run in it. While it offers excellent support for ipywidgets, it's certainly not confined to that. One downside of Voila is that it can be resource-intensive, as it creates a new kernel/process for each page view or browser tab.

Mercury, in my view, seems really interesting for quick demos and reports. It's somewhat akin to Streamlit, making it ideal for notebook authors.

On the other end of the spectrum (and pardon my shameless plug here), there's Solara (https://github.com/widgetti/solara/). Solara is a fully-fledged web framework for Python, specifically designed to handle app sizes that surpass what Streamlit and Dash can manage. It's worth noting that Solara can render ipywidgets, using a pure Python React-like framework. This can be particularly useful after the exploration phase, when you're looking to transition a project from the notebook into production.

Interesting. I hadn't heard of Solara before. We recently started exploring Pynecone. How does Solara compare to that?
In Solara you can dynamically put together the UI like in react, in pynecone you need to use their primitives to make lists and conditional rendering. Also, state management is not tied to solara, but could use dataclasses or pydantic, wrapped in a reactive variable.

I think what sets Solara apart from the rest is that we use a 10 year proven paradigm, React, but on the Python side, although with a more Pythonic API. For instance making reusable components in Python is a real benefit. Pynecone uses ReactJS in the front end, but on the Python side it’s their own API.

I do like pynecone, their API is pretty. I do wonder with many of these frameworks. Does the paradigm works for more complex apps, or does it end in complexity hell once you go past the hello world examples. At least React has proven itself.

Thanks for your reply. Solara looks great.

> For instance making reusable components in Python is a real benefit.

I think that could be a big benefit for us because we ran into problems when we wanted to create a custom component for a different Data Grid in Pynecone. In particular we tried to wrap AG Grid but ran into problems when we tried to change the styling because we couldn't overwrite the DIV element's class. Is that something that would be possible in Solara?

What Data Grids do you currently provide in Solara?

I tried to look at your Components API docs at https://solara.dev/docs/api but that's currently returning an error:

> "No object with name Page found for /opt/render/project/src/.venv/lib/python3.9/site-packages/solara/website/pages/docs/__init__.py We did find: 'Path' or 'generate_routes_directory' or 'title' or 'HERE' or 'routes'"

Not sure where you found that link, but https://solara.dev/api should work fine!

Let’s take that question to GitHub or discord not to go too much off topic here ok? Thanks!

Mercury certainly seems worthy of keeping an eye out.

Voila is the obvious competitor to this. There are also different oranges and apples such as Dash, Streamlit, Panel: https://anaconda.cloud/dashboardlandscape - obviously Anaconda is a bit biased here.

I suppose the biggest limitation to Mercury is the limited number of widgets. Good for quick demos.

Also deployment is a bit unclear at the moment - I wonder how easy it is to keep Mercury deployed in a separate Docker container - that is I do not want to keep random ports open on my notebook server.

Then again probably deployment/hosting is how Mercury expects to make some money.

Mercury is for quick demos. It is not a full web framework. The simplicity of the framework is very important for us.

We hope to extend widgets offering in the near future.

You are right. We are working on Mercury Cloud service where you can just upload notebook to deploy it. We have free and paid plans. But you can also self-host Mercury with docker-compose.

Main differences to Voila:

- Mercury has no callbacks - we automatically re-execute cells below updated widget,

- Mercury has no layout widgets, all input widgets are always in the left sidebar and output content appear in the same order as in notebook.

Thanks to above decisions you don't need to rewrite your notebook to fit UI framework paradigms.

That's great to hear. Voila is easy to use but I've always found difficulty make the UI look clean. Thanks!
Quick link: https://github.com/voila-dashboards/voila

Humbly recommend when you share a product, you include a link to it ;)

https://voila.readthedocs.io/en/stable/