Live data from Hacker News

Show HN: Mesop – Open-source Python UI framework

google.github.io

41–50 of 56 posts

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

#41

Earlier quoted context omitted.

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

Good point, we'll try to rephrase this to be clearer. Thanks for the feedback!

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

#43
post #32

Earlier quoted context omitted.

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

> HN doesn't support markown

Oh, but it does, it's just plaintext with classic “[squared](circle)” convention: clickable inline (references) following [annotated clauses]. We can read the term, and click the ref.

Markdown's point is if plaintext is supported, so is Markdown.

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

#45
This is very interesting. To build LLM chat-oriented WebApps in python, these days I use Chainlit[1], which I find is much better than Streamlit for this. I've integrated Chainlit into the Langroid[2] Multi-Agent LLM framework via a callback injection class[3], i.e. hooks to display responses by various entities. Example demos are here[4].

One of the key requirements in a multi-agent chat app is to be able to display steps of sub-tasks nested under parent tasks (to any level of nesting), with the option to fold/collapse sub-steps to only view the parent steps. I was able to get this to work with chainlit, though it was not easy, since their sub-step rendering mental model seemed more aligned to a certain other LLM framework with a partial name overlap with theirs.

That said, I am very curious if Mesop could be a viable alternative, for this type of nested chat implementation, especially if the overall layout can be much more flexible (which it seems like), and more production-ready.

[1] Chainlit https://github.com/Chainlit/chainlit

[2] Langroid: https://github.com/langroid/langroid

[3] Langroid ChainlitAgentCallback class: https://github.com/langroid/langroid/blob/main/langroid/agen...

[4] Langroid chainlit demos https://github.com/langroid/langroid/tree/main/examples/chai...

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

#46

I've had a quick look through the docs/demos. At the moment I use Flask/htmx/tailwind for my apps, but I like how succinct this framework is, but how themable is it?

You can customize the UI quite extensively using our Style API https://google.github.io/mesop/components/style/ If you like tailwind, I think you will like this as it's essentially like writing inline styles, but with a Pythonic, strongly-typed API.

I'll try a small demo of my existing app and see if I can transition it. I've started to use dominate to replace jinja templates anyway as the multiple languages on the web layer was just causing me friction and slowing down the rolling out new things.

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

#47
post #32

Earlier quoted context omitted.

fyi, HN doesn't support markdown

> HN doesn't support markown Oh, but it does, it's just plaintext with classic “[squared](circle)” convention: clickable inline (references) following [annotated clauses]. We can read the term, and click the ref. Markdown's point is if plaintext is supported, so is Markdown.

If it's not rendered, then it's not supported. This is very obvious in this case, where the square-brackets have no additional value, but make it just harder to read the text. The links are getting rendered independent of the brackets, so markdown-syntax has no function here.

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

#49
post #32

Earlier quoted context omitted.

fyi, HN doesn't support markdown

> HN doesn't support markown Oh, but it does, it's just plaintext with classic “[squared](circle)” convention: clickable inline (references) following [annotated clauses]. We can read the term, and click the ref. Markdown's point is if plaintext is supported, so is Markdown.

Following that logic, wouldn't HN be a runtime for anything written, from assembly to Python? Which sounds... not quite right?

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

#50

Earlier quoted context omitted.

> HN doesn't support markown Oh, but it does, it's just plaintext with classic “[squared](circle)” convention: clickable inline (references) following [annotated clauses]. We can read the term, and click the ref. Markdown's point is if plaintext is supported, so is Markdown.

If it's not rendered, then it's not supported. This is very obvious in this case, where the square-brackets have no additional value, but make it just harder to read the text. The links are getting rendered independent of the brackets, so markdown-syntax has no function here.

I think most markdown symbols add semantic comprehension or emphasis value in _plain_ text. That is functional[^1] even here.

Including the squared circle for inline links.

[^1]: As in functional requirements, is serving to convey the markup intent in a non rich text rendering.

Post reply on HN