TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Mesop – Open-source Python UI framework

130 点作者 willchen12 个月前
I’m excited to share about Mesop - a new, open-source Python UI framework that enables Python developers to quickly build delightful web apps in a scalable way.<p>A small team of us at Google have been developing Mesop as an unofficial 20% project for the past few months. A wide range of research and product teams at Google have been using it to rapidly build internal apps and we’ve gotten a lot of positive feedback internally so now we’re looking to get feedback from the open-source community.<p>We think that Mesop provides a unique approach to building web UIs in Python - making it both easy to get started and also flexible enough to build customized UIs for a wide range of use cases. You can learn more about why we built Mesop here: <a href="https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;blog&#x2F;2024&#x2F;05&#x2F;13&#x2F;why-mesop&#x2F;" rel="nofollow">https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;blog&#x2F;2024&#x2F;05&#x2F;13&#x2F;why-mesop&#x2F;</a><p>To look at some example Mesop apps, check out our demo gallery: <a href="https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;demo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;demo&#x2F;</a>. Also, the demo gallery itself is built with Mesop: <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;mesop&#x2F;blob&#x2F;main&#x2F;demo&#x2F;main.py">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;mesop&#x2F;blob&#x2F;main&#x2F;demo&#x2F;main.py</a> which demonstrates the type of flexibility you have in building apps with Mesop.<p>A couple of us will be on here answering questions. Let us know what you think!

17 条评论

herrington_d11 个月前
Glad to see Google employee still has 20% of their time to do side projects! Python UI is especially interesting for ML&#x2F;LLM folks who can build demos without changing tech stack.<p>I appreciate OP&#x27;s ideas about how this project is compared to Streamlit?
评论 #40588855 未加载
solidasparagus11 个月前
This is really cool - I love Python UIs. This seems very similar to streamlit.<p>But the demos aren&#x27;t very pretty :(<p>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&#x27;t afraid to dig into CSS as long as you make it feasible (<i>cough</i> streamlit <i>cough</i>).
评论 #40590916 未加载
jbednar11 个月前
I&#x27;ve added mesop to <a href="https:&#x2F;&#x2F;pyviz.org&#x2F;tools.html#dashboarding" rel="nofollow">https:&#x2F;&#x2F;pyviz.org&#x2F;tools.html#dashboarding</a>, where it is the 35th OSS Python dashboarding tool to appear. (There were 5 in 2019). It&#x27;s a crowded space!
评论 #40592619 未加载
c4wrd11 个月前
I have taken a thorough look at the source and I very much enjoyed it.<p>The project highlights the utility of Bazel more than I have seen before. How long did it take you (and others) to become as fluent as you are in Bazel and working with it?<p>Additionally, you (Will) seem to have a very intuitive grasp of build processes in general, notably many of the scripts are fun to dive into and have a very clean design. How did you familiarize yourself so well with those sorts of concepts? Do you have any recommended readings or side-projects you’d recommend tackling to get experience with?
评论 #40631346 未加载
groodt11 个月前
Exciting!<p>I&#x27;m surprised to see nobody has mentioned gradio yet. It seems to sit in the same niche as streamlit and mesop.<p><a href="https:&#x2F;&#x2F;gradio.app&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gradio.app&#x2F;</a>
gostsamo11 个月前
My standing question is &quot;How do you handle accessibility&quot;? Are the resulting apps accessible by default for people with screen readers? About peoplewith other disabilities?
评论 #40588780 未加载
d4rkp4ttern11 个月前
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&#x27;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].<p>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&#x2F;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.<p>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.<p>[1] Chainlit <a href="https:&#x2F;&#x2F;github.com&#x2F;Chainlit&#x2F;chainlit">https:&#x2F;&#x2F;github.com&#x2F;Chainlit&#x2F;chainlit</a><p>[2] Langroid: <a href="https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid">https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid</a><p>[3] Langroid ChainlitAgentCallback class: <a href="https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid&#x2F;blob&#x2F;main&#x2F;langroid&#x2F;agent&#x2F;callbacks&#x2F;chainlit.py">https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid&#x2F;blob&#x2F;main&#x2F;langroid&#x2F;agen...</a><p>[4] Langroid chainlit demos <a href="https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid&#x2F;tree&#x2F;main&#x2F;examples&#x2F;chainlit">https:&#x2F;&#x2F;github.com&#x2F;langroid&#x2F;langroid&#x2F;tree&#x2F;main&#x2F;examples&#x2F;chai...</a>
sergius11 个月前
How does it compare to <a href="https:&#x2F;&#x2F;nicegui.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nicegui.io&#x2F;</a> ?<p>How does it compare with <a href="https:&#x2F;&#x2F;flet.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;flet.dev&#x2F;</a> ?<p>Does it compete in the niche of making simple things easy and hard things possible?
评论 #40588103 未加载
评论 #40588627 未加载
kennethwolters11 个月前
This is a Great project I am really looking forward to using for internal apps. IMO a central requirement for internal apps is auth, especially OIDC&#x2F;SAML-type auth. How do you recommend implementing this in mesop?<p>Looking through the docs I am guessing a nice place for auth to hook into is the on_load parameter of the pages API? <a href="https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;api&#x2F;page&#x2F;#mesop.features.page.page" rel="nofollow">https:&#x2F;&#x2F;google.github.io&#x2F;mesop&#x2F;api&#x2F;page&#x2F;#mesop.features.page...</a>
评论 #40620471 未加载
EddieLomax12 个月前
This is appealing to me as a Python backend dev-- but if I end up building something cool for my own personal use, and I want to deploy it so others can use it-- is that a thing for this? I don&#x27;t see any kind of documentation for deploying it, but that could just be on me. I realize this is touted as a demo-friendly &#x2F; internal tool so that just might not be aligned for this type of thing.
评论 #40570218 未加载
spankalee11 个月前
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&#x27;t have to worry about integrating with the Angular compiler.
giancarlostoro11 个月前
Will you guys ever just do Python -&gt; WASM? I think the next &quot;Big break&quot; for front-end web dev is literally this. I&#x27;ve been using Microsoft&#x27;s Blazor (C#) which is this, with a mix of back-end and front-end capabilities, and I just don&#x27;t see any reason to ever use JS or React again.
评论 #40588667 未加载
评论 #40589750 未加载
devtom11 个月前
Thank you! This looks very interesting and promising. I had issues running it locally on my Mac with pandas problems. But I switched to collab and it run well there. I guess you would use &quot;requests&quot; to get and post data to the backend ?
评论 #40575364 未加载
zinclozenge11 个月前
I&#x27;ve seen a bunch of people recommending alternatives that are also Python based, makes me wonder if there&#x27;s similar things for other languages like Go, Rust, etc
评论 #40588937 未加载
VagabundoP11 个月前
I&#x27;ve had a quick look through the docs&#x2F;demos.<p>At the moment I use Flask&#x2F;htmx&#x2F;tailwind for my apps, but I like how succinct this framework is, but how themable is it?
评论 #40588813 未加载
oars11 个月前
Useful to know about this Python web UI framework. There are also other Python web UI framework suggestions in the thread replies too.
FloatArtifact11 个月前
If only we had something like this for native desktop applications.
评论 #40580770 未加载
评论 #40597337 未加载
评论 #40589519 未加载