Live data from Hacker News

Show HN: Mesop – Open-source Python UI framework

google.github.io

31–40 of 56 posts

Re: Show HN: Mesop – Open-source Python UI framework

#31

Will you guys ever just do Python -> WASM? I think the next "Big break" for front-end web dev is literally this. I've been using Microsoft's Blazor (C#) which is this, with a mix of back-end and front-end capabilities, and I just don't see any reason to ever use JS or React again.

As we mentioned Flet here - it's been able to build web apps running completely in the web browser (Flutter + Pyodide). Here are a few examples: https://flet.dev/gallery - most of those apps there are client-side except "Controls gallery" and "Chat" which are server-side.

Re: Show HN: Mesop – Open-source Python UI framework

#32

Glad to see Google employee still has 20% of their time to do side projects! Python UI is especially interesting for ML/LLM folks who can build demos without changing tech stack. I appreciate OP's ideas about how this project is compared to Streamlit?

Thanks for the question! Streamlit is definitely more mature and I think it's a great tool for many use cases. Where I think Mesop shines is that you get a lot of flexibility, just by writing your UI in Python. For example, Mesop has an out-of-the-box [chat component]( https://google.github.io/mesop/demo/ ), but if you need to customize it, you can actually just copy the [chat.py file]( https://github.com/google/meso…

fyi, HN doesn't support markdown

Re: Show HN: Mesop – Open-source Python UI framework

#33

Will you guys ever just do Python -> WASM? I think the next "Big break" for front-end web dev is literally this. I've been using Microsoft's Blazor (C#) which is this, with a mix of back-end and front-end capabilities, and I just don't see any reason to ever use JS or React again.

This is definitely something we've discussed and I think Python -> WASM is an exciting innovation. Right now, there's some challenges with how large of a WASM binary a typical Python app will compile to (e.g. bundling the std lib) and the initialization time [1]. I think supporting Python -> WASM could be one of the options we support, but there's probably always a need to support Python on the server, simply due to…

I've thought about trying to support something along the lines of Django Templates -> WASM, but the one interesting thing that Blazor does is it also renders the templates on the back-end for those who don't necessarily want to render it on the browser. I think you'd have to consider some sort of templating language, that intermixes nicely with Python. If I remember correctly, Mako was a templating library I used for a project ages back, they focused on letting you for the most part just use standard python for the scripting side of the template engine.

So if I had the time and energy, I'd spend my time looking at something like Mako, maybe even forking it, and making it minimal enough to build into WASM. I assume you mainly want to shove a templating library into WASM and not too much more. The rest you could offload to a smaller JS library your WASM can interface through.

I could be talking off my other end, but this is all spit balling from various things I've read, I'm by no means a total expert.

Re: Show HN: Mesop – Open-source Python UI framework

#34
This is really cool - I love Python UIs. This seems very similar to streamlit.

But the demos aren't very pretty :(

I feel like being able to build something beautiful should be a requirement for any tool to build UIs. People like me who care about the looks aren't afraid to dig into CSS as long as you make it feasible (cough streamlit cough).

Re: Show HN: Mesop – Open-source Python UI framework

#36

This is really cool - I love Python UIs. This seems very similar to streamlit. But the demos aren't very pretty :( I feel like being able to build something beautiful should be a requirement for any tool to build UIs. People like me who care about the looks aren't afraid to dig into CSS as long as you make it feasible ( cough streamlit cough ).

Thanks! Agree, we wanted to provide a high-degree of customizability with a CSS-like API https://google.github.io/mesop/components/style/ so you can create delightful demos.

Re: Show HN: Mesop – Open-source Python UI framework

#37

This is really cool - I love Python UIs. This seems very similar to streamlit. But the demos aren't very pretty :( I feel like being able to build something beautiful should be a requirement for any tool to build UIs. People like me who care about the looks aren't afraid to dig into CSS as long as you make it feasible ( cough streamlit cough ).

Thanks! Agree, we wanted to provide a high-degree of customizability with a CSS-like API https://google.github.io/mesop/components/style/ so you can create delightful demos.

Ah that's excellent! I didn't notice that, it might be a good idea to highlight it a bit more. On the front page, "Build custom UIs without writing Javascript/CSS/HTML" made me think CSS wasn't an option

Re: Show HN: Mesop – Open-source Python UI framework

#39
It would be really awesome if the native component model were built around standard web components instead of Angular. This would let people bring their own components regardless of what framework they were built in. And for the built-in native components, it means you wouldn't have to worry about integrating with the Angular compiler.
Post reply on HN