5 ms·
Google Mesop: Build web apps in Python
- imachine1980_ 2y agothis is rapid development all over again, it funny how the pendulum go as years pass.
- tomcam 2y agoI'm thinking of bringing back Basic but with a twist. Hear me out. You'd have a forms package built in. It would be a visual approach for programming business apps. Haven't come up with a clever name for it yet.
- elteto 2y agoWhat about "Visual <something>"? Since, you know, it's visual. This idea sounds promising. Who knows... you might even get one of the tech giants interested! Some of them have a lot of business customers that could use something like this.
- tomcam 2y agoStrong! I feel like we both see the future
- stult 2y agoIf only we could bundle it with the world's most commonly used tabular data tool, it could run the entire world
- elteto 2y agoDon't you think that would be going too far? I worry what unholy creations people might come up with... A tabular data tool with a full development environment might just be too much power concentrated in a single application.
- SmellTheGlove 2y agoNah people will just use it to run football pools and fantasy baseball leagues. It won't be a serious thing.
- russfink 2y agoThe dialog of this thread could fill out three panels of an XKCD comic quite nicely.
- 1024core 2y agoI like your ideas and would like to subscribe to your newsletter.
- spencerchubb 2y agoI'm struggling to understand this demo app. You type in some text and it echoes the exact same text back to you? I assume the project just hasn't fully fleshed out the readme
- ncr100 2y agoThe getting started demo app is broken (for me) https://google.github.io/mesop/getting_started/ https://google.github.io/mesop/getting_started/ 404 at the end of a long page of enormous icons and broken-image links.
- resist_futility 2y agohttps://google.github.io/mesop/getting_started/installing/ https://google.github.io/mesop/getting_started/installing/
- djtriptych 2y agoI'm noting the use of "stream" and that the upper_case function is a generator (see the `yield` keyword) which I take to mean any asynchronous process could be placed there. e.g. a call to a chatbot api.
- burcs 2y agoHow does this differ from reflex? https://github.com/reflex-dev/reflex https://github.com/reflex-dev/reflex
- jackson928 2y agoSeems very similar almost identical in some aspects...
- xyzzy4747 2y agoIMO it's better long-term for an individual to just learn Next.js, React, Tailwind.css (my preference), and TypeScript. You will be a better developer than using something like this.
- jvolkman 2y agoThose sound like tools used to build a production, customer-facing webapp. Whereas this framework and others like it seem targeted at internal things, like some buttons and textboxes for an internal "admin" page or similar.
- xyzzy4747 2y agoIf you already know next.js you can very quickly throw together internal things too. If you don't know it then it might take a while.
- moondev 2y agoIs this google's version of https://www.gradio.app https://www.gradio.app ?
- ChrisArchitect 2y ago[dupe] Shared in a Show HN: by devs: https://news.ycombinator.com/item?id=40567327 https://news.ycombinator.com/item?id=40567327
- jackson928 2y agoWas on hacker news 5 days ago with same title
- behnamoh 2y ago[flagged]
- ta20240226 2y agoRemember, this is from the company that thought that laying off their Python team was a good idea. https://news.ycombinator.com/item?id=40171125 https://news.ycombinator.com/item?id=40171125 Draw your conclusions of the level of support for this library.
- foota 2y agoI don't think you need to draw your own conclusions: "This is not an officially supported Google product".
- devsda 2y agoFor small time developers and normal users, "Google support" already feels like best effort community support.
- MattGaiser 2y agoEven GCP seems “best effort.”
- metadat 2y agoIs it really, though? Not in my experience. The bureaucracy has taken full control of The Host.
- nickysielicki 2y agoYou’re totally missing the point. The point is: you have some Python script, and you don’t want it to disappear into the sad world of a ticket attachment, and if you add the 5 lines of code and have a nice onboarding experience, it doesn’t have to disappear into a ticket attachment, it can instead disappear into your browser bookmarks. You should never test the limits of this framework because if it’s anything other than putting a simple script into a webpage, you shouldn’t be using this. It’s rot proof.
- shmatt 2y agoThe US Python foundational team was less than 10 people. If you think any 10 person team in a 200,000 employee corporation is that critical well I’d have to disagree When their jobs were moved to Munich there was a lot of discussion about how important they were, but something else stood out to me. One of the things they accomplished was taking over a year to make sure the monorepo can be upgraded to the latest version of python As an outsider this definitely smells like an org creating work just to justify its budget. You have a single team of a handful of engineers doing the python upgrade work for tens of thousands of engineers. Doesn’t feel right out of the bat I’m sure soon enough with the role moving they’ll find out if the team is needed at all
- paulcole 2y ago> Build delightful web apps quickly in Python What makes them delightful? The Steve-Jobs-ification of marketing copy continues unabated.
- fuzztester 2y agobro. you don't get it, do you. this sort of copy is just table stakes in hi(and bye) tech nowadays. you know, for these times when there is nothing under the table. not even legs*, I mean. *as in, "this thing has legs".
- fuzztester 2y agosnicker. as usual, the hacker news subset consisting of the echo chamber / hive mind / tech bosses' slave crowd, can't digest / handle comments like mine above, while at the same are fine with the comment in a similar vein by paulcole, to whom I just replied above. long live discrimination on hacker news! hip! hip! horror!
- nvader 2y agoDo note that this is not an officially supported Google product, as per the disclaimer.
- bsimpson 2y agoThe official documentation for releasing personal projects at Google is externally available: https://opensource.google/documentation/reference https://opensource.google/documentation/reference I believe many of the repos in the @google GitHub org are people's personal projects (and hence not officially staffed/supported, as disclaimed). In the linked Show HN, the authors confirm it's a 20% side project.
- zem 2y agosome of them; others are internal tools used at google that the company is happy to let the devs open source, but which are not official google "products". my main project when I was at google was in that category: https://github.com/google/pytype https://github.com/google/pytype - it was not an "official google product" in that google was not officially supporting it for external users, but it's an extensively used product within google and developing it was my full time job.
- bsimpson 2y agoVery true. I just wanted to point out that just because something is in the @google org, doesn't mean it should be thought of as Google <something>.
- dudus 2y agoThis tool fills a very narrow use case for demos of AI chat. If you know Python and can run inference models on a colab then you can quickly whip up a demo UI with builtin components like chat with text and images. Arguably everyone is testing these apps so making them easy is cool for demo and prototyping. For anything more than a demo you don't use this.
- brilee 2y agoxoogler/ML researcher here. Everyone at Google used colab because the bazel build process is like 1-2 minutes and even just firing up a fully bazel-built script usually takes several seconds. Frontend is also near impossible to get started with if you aren't in a large established team. Colab is the best solution to a self-inflicted problem, and colab widgets are super popular internally for building hacky apps. This library makes perfect sense in this context...
- westurner 2y agoHow could their monorepo build system with distributed build component caching be improved? What is faster at that scale? FWIU Blaze was rewritten as Bazel without the Omega scheduler integration? gn wraps Ninja build to build Chromium and Fuschia: https://gn.googlesource.com/gn https://gn.googlesource.com/gn
- westurner 2y agoWhat other use cases is this tool insufficient for? BentoML already wins at model hosting in Python IMHO. What limits this to demos? IIRC there are a few ways to do ~ipywidgets with react patterns in notebooks, and then it's necessary to host notebooks for users with no online kernel, one kernel for all users (not safe), or a container/vm per user (Voila, JupyterHub, BinderHub, jupyter-repo2docker), or you can build a WASM app and host it statically (repo2jupyterlite,) so that users run their own code in their own browser.
- curious_cat_163 2y agoReminds me of FastUI: https://github.com/pydantic/FastUI https://github.com/pydantic/FastUI
- tjpnz 2y agoI seem to recall using a different Google library to build web apps in Python for Google App Engine. What happened to that and how does this differ?
- c4wrd 2y agoDisregarding all of the negative sentiment and claims of this repeating old work, I must say the source code is very fun to go through. The code is well-structured, integrates many awesome technologies and provides a foundation to build on. The project is the clearly the result of a high caliber level of craftsmanship and labor of love, great work Will Chen (wwwillchen) and others!
- benterix 2y agoI agree with you, with just one exception - hardcoding ANSI escape sequences in strings (yes, a pet peeve of mine). https://github.com/google/mesop/blob/fa17bcdcd765adef4b3259e3523268ff2c66498a/mesop/bin/bin.py#L33C1-L33C87 https://github.com/google/mesop/blob/fa17bcdcd765adef4b3259e...
- 420698008 2y agoIt's funny how much negativity was/is around things like NodeJs when so many back end engineers railed against frontend folks for only wanting to use JS and not adapting "proper" languages when they always go and try to go out of there way to do the same thing in reverse. Not that this isn't worthwhile or interesting
- tormeh 2y agoHaving the same language on both ends (plus mobile devices, where the synergy is much larger) is a good idea! It’s just that JS sucks.
- Uptrenda 2y agoThe issue that stands out to me with this is its not using coroutines. Python developers who don't know everything about the GIL, threading, blocking v non-blocking sockets, processes, all of that can of worms, are going to try regular blocking I/O (that they might have done fine in PHP) leading to horrible performance. I think the choice to do this with 'threads' in Python (not real threads) = very bad. I think you can have multiple processes here but if you're using just Python for the web server the overhead is going to be massive for an interpreter... The correct approach would have been to have an event loop in every process handling 1 - however many clients for the server. Then async I/O functions can be done inside the app routes without potentially impacting the performance of every other client being processed. The software here seems to use Flask for the underlying server stuff (when running from Python.) But anyone whose tried to use flask for a web project before knows that its slow AF since it loads everything one after the other. When looking that up I think you can tweak the number of processes it uses but IMO: it's not the right approach.
- anothername12 2y agoIs this a HTML over the wire thing?
- volkk 2y agoreminds me of GWT (google web toolkit)
- westurner 2y agoAnd Wt and JWt, which also handle the server side in C++ and Java. https://en.wikipedia.org/wiki/Wt_(web_toolkit) https://en.wikipedia.org/wiki/Wt_(web_toolkit) : > The only server-side framework implementing the strategy of progressive enhancement automatically Is this still true?
- Ozzie_osman 2y agoFor someone who just browsed the description, would this be similar to streamlit?
- alabhyajindal 2y agoWhat's with the obsession of writing web apps in Python? > Build custom UIs without writing Javascript/CSS/HTML Why? These three were built for the web and work flawlessly. I doubt that an abstraction built on top of these will result in faster development times. The State Management guide[1] explains state and then explains the usage. If you know Python and want to build a UI with it you'll have to read the guides. The argument that having a familiar language simplies development doesn't stand here. There are multiple projects now that allow you to build a UI in Python and it feels wrong to me. Who is it even intended for? [1] https://google.github.io/mesop/guides/state_management/ https://google.github.io/mesop/guides/state_management/
- zinodaur 2y agoIt appeals to me. I don't write fronted code, but sometimes I want a frontend, even if it's really dinky. This seems way more approachable to me than learning JS/all the shit you have to deal with to write a non-toy ui
- alabhyajindal 2y agoLet's say you want a frontend for your server and have never written HTML before. Where so you start? If you have decided on using Python for the UI you have a handful of libraries each with their own documentation. To get started you need to choose one and then read the guides. If you decide to use HTML you have a whole lot more resources. I'd argue you'll be able to make a frontend faster using this approach. I understand the hesitation because of the complexity associated with JS. Maybe you're thinking about bundlers and minifiers when you think about writing a frontend with JS. But you don't need that. You can create amazing user experiences with a plain HTML, CSS and a JS file.
- simula67 2y agoWhile you may be able to create amazing experiences in JavaScript, JavaScript still has multiple problems: 1. It is inconsistent [1] 2. It does not have many features that programmers love and other languages have. 3. It has a community that holds different values from what other programmers value themselves. If people want to continue development in JavaScript, they can. But since JavaScript has a monopoly on the (fairly large) 'frontend development for the web' market, there will always be attempts to find an alternative. [1] https://www.destroyallsoftware.com/talks/wat https://www.destroyallsoftware.com/talks/wat
- deleted 2y ago[deleted]
- throwaway290232 2y ago[dead]
- deleted 2y ago[deleted]
- danpalmer 2y agoFor some clarity on the support here: at Google it’s very easy to publish arbitrary code on the Google GitHub, and a bit of a pain to get permission to publish (new) projects on your personal GitHub. It’s also not too tricky to take a project with you (i.e. transfer ownership) if you leave. For these reasons, many googlers just publish their hobby projects on GitHub under the Google org. That’s most likely what this is, the support disclaimer is the big giveaway.
- benterix 2y agoOh that makes it more clear, thanks!
- dragonwriter 2y agoGenerally interested in this kind of thing, but the documentation seems broken so I can't tell why I’d use this instead of NiceGUI or any of the other Web-GUI-in-Python libraries/frameworks.
- mrkramer 2y agoI have quite a few ideas for web sites or web apps but JavaScript syntax and HTML/CSS web modelling is turning me off so I wonder would this be feasible for simple experimental web app/s? I also explored Golang which also has easy to pick up syntax as Python and it is also easy to build web apps with it so I kinda dunno where to start.