11 ms·
BeeWare – write Python, run everywhere using native UIs
- dec0dedab0de 5y agoAt Djangocon 2016 I contributed a bug fix and Russel gave me a Yakshaver coin, I thought that was a neat way to get people involved. I was going to do more, but my boss called and made me leave early. https://beeware.org/contributing/challenge-coins/ https://beeware.org/contributing/challenge-coins/ I'm glad to see it's still going, I'm going to try it out again.
- kissiel 5y ago"native" as in "native user interfaces"
- 95014_refugee 5y agoAnd "everywhere" as in "user-facing systems".
- bogwog 5y agoIs there such a thing as a non-user facing system with a user interface?
- capableweb 5y agoServer hardware is generally not user facing (well, everything is "user" facing considering who the "user" is, maybe better to say "end-user facing") and has interfaces, both hardware and software usually, on one or another level.
- unfocussed_mike 5y agoPresumably you'd just use ordinary Python there.
- berkes 5y agoNone of those interfaces are user-interfaces, though.
- capableweb 5y agoYes, anything that sits between a human and the inner-workings of a computer is a user-interface. That power-button on the panel of the server hardware? That's a user-interface.
- iqanq 5y agoAnd not even that. Unless they are pretending that GTK+ or Qt or whatever they've chosen looks native on desktops.
- YellowStuDregg 5y agoThey do use native widgets: https://toga.readthedocs.io/en/latest/background/philosophy.html https://toga.readthedocs.io/en/latest/background/philosophy....
- dang 5y agoOk, we've put that in the title above. (Submitted title was 'BeeWare – write Python, run as native everywhere')
- nicmccool 5y agoI'd gone down the rabbithole the last few days of whether to use kivy or beeware for a personal powerlifting app I'm building as side project / learning experience. I'd gone as far as settling on Kivy and installing the dependencies (which took an extra few hours until I learned only python <= 3.8 is used), and now this pops up here and I'm reconsidering everything... again. On paper Beeware sounds perfect for my needs, but the limited community support has me timid to try.
- JasonFruit 5y agoI wrote a few small Android apps using Kivy, and I ran into some problems with performance with scrolling lists of buttons. Doing it the most obvious, natural way led to obvious poor performance — a list of more than a dozen or so buttons simply could not be scrolled without accidentally clicking on one. There was a recommended workaround, which I found and used, and its performance was slightly less obviously bad — it showed up with dozens of bad reviews from users of slightly outdated devices. The last I looked, Kivy had not progressed on that issue. I didn't continue to use it, and don't know if it has other similar problems, but it was a discouraging experience for me.
- guitarcase 5y agoDid you by any chance use recycleview for the listviews? Seems to be the recommended way but the documentation is not very clear on how to use them.
- clued 5y agoI made a Kivy/KivyMD mobile app as a part of my diploma project like a year ago, and I surely wanted it to be a cool little learning experience, too. It was a disaster! I mean, the KV language is pretty neat, but the insane amount of tooling involved (that always, always fails) to actually open your app on your phone is disgusting. Disgusting as in using three different versions of Python, setting up mismatching Android tooling, cross-compiling wheels on your virtual machine only for it to fail with some cryptic GCC error disgusting. It's also pretty outdated (e.g. camera doesn't work properly with the last ~5 Android APIs), and of course very slow, even if you pre-optimize your code with pagination and stuff. Kinda regret using Kivy at all, despite its community being amazing. So, can't recommend. Perhaps, you could consider learning Flutter instead? It will take just about the same time investment, but the whole experience is incomparable. Even better, make a test app in Kivy, and then make one in Flutter. (This is only partly a joke, though. It's really that fun.)
- deleted 5y ago[deleted]
- Retr0id 5y agohttps://beeware.org/project/projects/libraries/toga/ https://beeware.org/project/projects/libraries/toga/ For a UI framework, there is a distinct lack of screenshots. > > So, why is it called "Toga"? > When in Rome, do as the Romans do. And what does a Roman wear? A Toga! Ha, that's a clever choice.
- JasonFruit 5y agoIf you follow the Documentation link, there are a few.
- upwardbound 5y ago> For a UI framework, there is a distinct lack of screenshots. Yeah. I was able to find some here; looks clean and reasonable at least on Mac: https://twitter.com/PyBeeWare/status/1366274894967709702/photo/1 https://twitter.com/PyBeeWare/status/1366274894967709702/pho... https://maestral.app/assets/images/screenshot.png https://maestral.app/assets/images/screenshot.png (I'm including the Maestral link because one of @pybeeware's tweets says that Maestral is a BeeWare app)
- udbhavs 5y agoHere's how it looks on Android and iOS - https://docs.beeware.org/en/latest/_images/tutorial-5-launched.png https://docs.beeware.org/en/latest/_images/tutorial-5-launch... https://docs.beeware.org/en/latest/_images/tutorial-5.png https://docs.beeware.org/en/latest/_images/tutorial-5.png
- eesmith 5y agoThough with an inauspicious context. Quoting https://en.wikipedia.org/wiki/Toga https://en.wikipedia.org/wiki/Toga : > From its probable beginnings as a simple, practical work-garment, the toga became more voluminous, complex, and costly, increasingly unsuited to anything but formal and ceremonial use. It was and is considered ancient Rome's "national costume"; as such, it had great symbolic value; however even among Romans, it was hard to put on, uncomfortable and challenging to wear correctly, and never truly popular. When circumstances allowed, those otherwise entitled or obliged to wear it opted for more comfortable, casual garments. > ... the toga's bulk and complex drapery made it entirely impractical for manual work or physically active leisure. The toga was heavy, "unwieldy, excessively hot, easily stained, and hard to launder".[39] It was best suited to stately processions, public debate and oratory, sitting in the theatre or circus, and displaying oneself before one's peers and inferiors while "ostentatiously doing nothing".[
- stavros 5y agoBeeWare looks great, as always, but my impression is that the documentation/ecosystem isn't very extensive, so I've always been loath to try it. In such an extensive toolkit, I think ecosystem/community is important, as otherwise you'll be hitting walls frequently that will be hard to get past.
- pininja 5y agoDoes this have support for installing and linking to useful native utilities, like GraphicsMagick? Python is such a good glue. Sometimes I want to make a small GUI that combines great python libraries with great CLI applications.
- udbhavs 5y agoLooks like it might be possible but difficult on mobile: https://docs.beeware.org/en/latest/tutorial/tutorial-6.html https://docs.beeware.org/en/latest/tutorial/tutorial-6.html "On desktop platforms (macOS, Windows, Linux), any pip-installable can be added to your requirements. On mobile platforms, your options are a little more limited - you can only use pure Python packages i.e., packages that do not contain a binary module. This means that libraries like numpy, scikit-learn, or cryptography can be used in a desktop app, but not a mobile app. This is primarily because mobile apps require binary modules that are compiled for multiple platforms, which is difficult to set up. It’s possible to build a mobile Python app that uses binary modules, but it’s not easy to set up – well outside the scope of an introductory tutorial like this one."
- pzo 5y agoThis was actually a dealbreaker and blocker for me when I last time tried BeeWare. I was hoping I will be able to do some rapid prototyping with numpy + opencv-python directly on my android or iphone. I wish there was at least some tutorial how to make non-pure python modules. I had the same issue when investigating Kivy and PyQt. It definitely seems possible since you can download Pydroid [1] for android (that supports e.g. pyqt, opencv, tensorflow) or Pyto [2] for iOS (that seems actually is based on BeeWare and support many non-pure modules including opencv) [1] https://play.google.com/store/apps/details?id=ru.iiec.pydroid3 https://play.google.com/store/apps/details?id=ru.iiec.pydroi... [2] https://github.com/ColdGrub1384/Pyto https://github.com/ColdGrub1384/Pyto
- codethief 5y agoHow difficult would it be to use numpy on mobile? I mean, there is an arm64 build after all.
- The_rationalist 5y ago
- samwillis 5y agoThe BeeWare system is incredible and so close to really taking off. What I feel it needs if a proper corporate sponsor, an organisation that will embrace it itself for its own products and invest back into the project. It’s the best chance of Python on mobile we have.
- dec0dedab0de 5y agoI always thought Kivy was the best chance of python on mobile. I was able to get a python android app working around a decade ago. Nothing special, only installed locally just to see if i could do it. But it was working back then, and it's still under development. Though I am excited to try out beeware again.
- Cadwhisker 5y agoThere's also Fman's Build System (FBS): https://build-system.fman.io/ https://build-system.fman.io/ It's got some very similar features to BeeWare and the author is on Hacker News somewhere...
- IshKebab 5y agoI just don't understand why you'd choose something as slow as Python for this. Not sure how it could compete with React Native which seems like the closest equivalent, but in a much faster and better language.
- udbhavs 5y agoI would love a cross platform native toolkit like this for a typed language like Kotlin or Rust
- coldtea 5y agoWell, there is one for Kotlin: https://www.jetbrains.com/lp/compose-mpp/ https://www.jetbrains.com/lp/compose-mpp/
- udbhavs 5y agoKotlin multiplattorm doesn't do iOS UI, only some business logic sharing using kotlin compiled to native. The UI layer still needs to be in Swift
- amelius 5y agoThere are so many different languages, that we stopped making any progress!
- nu11ptr 5y agoI agree with this, and yet, I love these new languages (esp. Rust) so I'd hate to halt progress. Instead, what I think we need is a solid cross platform native UI library targeting C (libui would be a candidate - before it lost momentum). It would then be a reasonable amount of work to create multi-language bindings. Instead we have things like wxWidgets/Qt that are a pain to create bindings for since it is written in C++. As proof this would accelerate things, notice how many languages have GTK bindings (C based).
- serial_dev 5y agoI work now with Flutter full time and love it, but on my way from web Vue.js to mobile development with Flutter, I was researching different app frameworks, and I watched some videos with the main author of BeeWare/Toga, Russell Keith-Magee. The presentations are very engaging and the solution that this project came up is really something. This is my favorite video by Russel [0], it really is a fascinating project, and he is a great speaker. With that said, I don't really see it becoming a widely used framework. No matter how creative the solution is, it's hard to compete against real native, Kotlin Multiplatform Mobile, Flutter, React Native, Electron, and more. The most complicated example I saw with BeeWare is a todo list app [1] [0] https://www.youtube.com/watch?v=qaPzlIJ57dk https://www.youtube.com/watch?v=qaPzlIJ57dk [1] https://www.youtube.com/watch?v=RisCgSIWwLA https://www.youtube.com/watch?v=RisCgSIWwLA
- virtualwhys 5y ago> work now with Flutter full time and love it. Do you love Dart though? Flutter's stateful hot code reload is amazing but, man, for me Dart is just completely hideous. Maybe I've gotten spoiled by Typescript and Scala...
- travisgriggs 5y agoI’m with you. Dart felt like a step back in time for me. I was a big fan of some of the early Dart leaders (Lars Bak and Gilda Bracha). I remember when I asked why Dart seemed like a watered down variant of some Lars and Gilads earlier work; I was tiled by a former colleague that had joined the project that “Lars was playing it safer, playing to win” these days. I don’t know how much either of these people are associated with Dart anymore. Somewhere in Dart’s search of a killer problem to be the solution for, we got fully typed Dart (as opposed to the original annotations are optional mindset). I did one of the free web courses for it, built like 10 teeny pointless apps. Three things stood out: - the experience was kind of painful on iOS, the look had an “uncanny” effect - the tutor tried to explain classes as a “way of organizing code” which undersells what classes are really about (binding behavior to data) - the language felt like an alter Java (type declarations in the left side still??)
- 5y ago
- jedberg 5y agoDoes anyone know of any apps that were developed with this? They didn't have any examples on their site that I could find.
- streamofdigits 5y agoBoth BeeWare and Kivy are great projects adressing a space that could surely produce some very interesting applications. Offering seamless integration of the versatile python stack on mobile devices would be a game changer as far as I am concerned, turning the mobile more into a computing device as opposed to merely facilitating the fastest click to the cloud. They seem under-resourced, though, especially BeeWare. Targeting platforms that do not support python natively feels like a task that would challenge even much larger teams
- deleted 5y ago[deleted]
- miketery 5y agoI wish I saw this before I started on the road with React Native. Lot's of similarities but seems easier and thinner (i.e. npm is too bloated).
- einpoklum 5y ago
- bastardoperator 5y ago"Write once. Deploy everywhere."... I've heard this too many times to take it seriously anymore.
- nu11ptr 5y agoI'm still a fan of this concept, but I think you have to keep your expectations realistic. You are likely going to have to make some platform specific considerations, just a lot less than without an abstraction technology. Generally, I've found this manageable, but it can be hard to pull off well for sure. Some have succeeded rather well I think (Java comes to mind). Native GUI frameworks can be more of a challenge. Still, if you want a native L&F your alternative is to code each platform individually, then something like this (or wxWidgets/SWT/etc.) is likely to be a lot less work (but likely to look a bit less native). Trade offs. Good to have choices I think.
- y4mi 5y ago"write once, deploy everywhere [you've got the same kind of hardware or machine available so that the code will work without recompilation and won't look too out of place]" just doesn't have the same ring to it...
- mrtksn 5y agoIt never works well because the platforms are not simply the same thing by different companies but they all have their concurrent ideas, conventions and differences. The toolset for "Write once. Deploy everywhere." that works is HTML + JS + CSS and nothing else. This is because browsers work about the same everywhere. IMHO if an app is not going to leverage the platform but will simply show some UI to display or collect data, the way to do it is HTML + JS + CSS in the browser. When you try to support platform specific features, you end up doing much more work but instead of working on the primary App, you spend you time on integration and replication of platform behaviour or functions.
- c-smile 5y agoThere are two major types of application: one where users play role of "reader" and second type is where user is "writer" - creator of some data, document, etc. > that works is HTML + JS + CSS and nothing else. That type of UI mostly works for "reader" applications - when maximum what you do is clicking on buttons and filling couple of <input>s. For "creator"'s applications, CADs, editors, IDEs, and so on, HTML + JS + CSS is far from being perfect. At least without special means that extend these technologies to acceptable level. Menu shall be menu but not that position:absolute something, dialog shall be modal window, drawing shall support immediate mode, keyboard interaction shall be there, and so forth.
- jollybean 5y agoCan people comment here on how powerful they believe Python is vs. something like Javascript/Typescript. The later have their flaws but do really well for UI development. Is there truly an inherent advantage in Python? Are some people inherently keen on the language?
- musingsole 5y agoThe language specifics are mostly a subjective judgement, but if you can get Python into the same niches as Typescript, then the ecosystem can payoff tenfold. The number of convoluted JavaScript "data" apps that I've replaced with python and just a dash of Pandas is too high.
- jollybean 5y agoAgreed, but this is where Python shines and I don't think it's because of anything to do with Python other than that's where the critical mass of data support lies. I mean, it's somewhat more suited to data crunching ... I wonder if the significant increase of Python users lends well to it being also usable as a UI tech with the advantage merely being familiarity, consolidation of tech (i.e. 'we only use Python in house, no need for JS' etc..
- rich_sasha 5y agoPython is a great language. Really nice to work with, if you don’t mind the premise (no static safety etc). It’s not really focused on UI though; packages exist but are kind of niche, I’d say. Not exotic: you have wrappers for Tkinter, Qt, WxWidgets etc. But most people writing serious native GUI apps avoid Python. I’ve always found Python GUIs slow and clunky. Web is different for many reasons and there Python does well.
- onphonenow 5y agoTargeting windows is really interesting actually - Microsoft has made such as a hash of the development story on Windows I'm surprised more folks haven't made a run at that market. In my case, I like rich local app -> remote data store. Does anyone know how well this performs on windows.
- cutler 5y ago.Net 6/MAUI seem pretty impressive to me.
- Cadwhisker 5y agoIf you know how to take advantage of Qt, then you can make real-time video player, a real-time interactive graph or whatever else you can build with Qt's framework, then deploy it to Windows, Mac or Linux as if it were a native app.
- onphonenow 5y agoI could never figure out what in QT you had to pay for when. That seems to have improved recently, looks like $3,600 per year to develop an app with QT. The get going story seems MUCH improved for python though which is interesting. https://doc.qt.io/qtforpython/quickstart.html https://doc.qt.io/qtforpython/quickstart.html Still a bit pricey to just play around with building something I think for someone small? But at least it's simpler, I could see buying something now - before it was impossible. I never really got into QML (javascript type language). I'm not sure QT creator let's you form build with python? Downloading it is an evaluation thing as I look at it.
- movedx 5y agoAre you suggesting not using BeeWare and using Qt instead? I only want to target Windows and macOS (I'm ignoring mobile.) For web I'm stuck in my ways and just go with Golang + server-side rendering (a bit of JS to make forms nicer.) I was looking at Fyne for doing desktop UIs in Go: https://github.com/fyne-io/fyne https://github.com/fyne-io/fyne I can keep everything in the Go ecosystem that way. Any thoughts or advice?
- explaingarlic 5y agoLooks well and cool, but the enterprise "pricing" seems a little... optimistic. > $5000/month > An annual meeting with core team I understand that these are technically "donations" but the incentives offered are very much just a lightweight support agreement for 2-10x the price. I have no reason to believe that a python based UI solution that finally captures some market share could be a big success, and are that point the pseudo donation model would go out the window. Best of luck to these guys, would be cool to not be forced to use TKinter in school assignments.
- dec0dedab0de 5y agoIf you think of it more like a sponsorship instead of professional services, the pricing model makes sense. Especially since it is open source. You would only be paying to have your name listed, and have some direct influence on the direction on the project.
- spicybright 5y agoThat is absolutely insane. What exactly do you get for $60,000 a year? I could hire a contractor to build out all the UI in whatever framework I want. Plus I avoid paying someone to build it + pay for the framework. BTW, I've used QT4 in the past with python and it was an absolutely dream to work with. In 2 months part time work, I was able to produce a very high quality app that worked on windows, linux, macos. Highly recommend instead of TK.
- nu11ptr 5y agoHave you used wxPython at all by chance? Curious how it compares in developer experience compared to PyQt/PySide. I like that it uses native widgets, but if Qt is that much easier to deal with I may just go that direction.
- spicybright 5y agoI actually looked into wxPython, admittedly only for a day or two to get the general idea behind it. It seemed complicated and not very mature at the time from my experience under linux (circa 2019 I want to say?) But after spending the same amount of time with QT it definitely won out. I used pyQT (python bindings for QT) + I believe PyInstaller (https://pyinstaller.readthedocs.io/en/stable/ https://pyinstaller.readthedocs.io/en/stable/) for building the executable. Was a very pleasant experience!
- dang 5y agoPast related threads: Beeware – Android and iOS Apps in Python - https://news.ycombinator.com/item?id=24487867 https://news.ycombinator.com/item?id=24487867 - Sept 2020 (25 comments) BeeWare project: A request for your help - https://news.ycombinator.com/item?id=14034353 https://news.ycombinator.com/item?id=14034353 - April 2017 (1 comment) Build and ship native GUI apps on Python with Beeware [audio] - https://news.ycombinator.com/item?id=12719433 https://news.ycombinator.com/item?id=12719433 - Oct 2016 (6 comments) BeeWare: The IDEs of Python - https://news.ycombinator.com/item?id=12374952 https://news.ycombinator.com/item?id=12374952 - Aug 2016 (1 comment) BeeWare – The IDEs of Python - https://news.ycombinator.com/item?id=9616641 https://news.ycombinator.com/item?id=9616641 - May 2015 (28 comments)
- arjvik 5y agoI've tried using Briefcase before, and I completely gave up. The goal was to get a cross-platform Qt app compiled down to a single executable, but I couldn't even get it to run on the machine it was compiled on, much less a windows machine without Python installed. Am I an outlier, or is it this difficult to get working at first? I imagine that once you get a working build, it must work quite smoothly!
- franga2000 5y agoI haven't used this framework, but this has been my experience with pretty much all UI frameworks and especially with Python ones. Even the demo projects are often a pain to package and starting from scratch means hours of reading docs and changing parameters almost at random to see what happens. Windows is the absolute worst for packaging Python (unless you give up and package everything in a self-extracting exe, but then antivirus is even more likely to eat it) and Android barely runs native Qt (seriously, the demo project from their website straight up doesn't build), so I can imagine that running something with 4 layers of stuff in between would have even worse odds of working.
- Cadwhisker 5y agoI've used Python, Qt and BeeWare to develop an interactive tool to analyse compressed video. It's fast enough that I don't know it's not a native app. You can make some very complex applications if you learn to take advantage Qt's features. I start with a release of WinPython, then use its command line to make a virtual environment, install `briefcase` and go from there. I should also add that I found FMan's Build System to be quite easy to do the same thing: https://github.com/mherrmann/fbs-tutorial https://github.com/mherrmann/fbs-tutorial
- fiatjaf 5y agoWhat if instead of trying to make standalone programs that run everywhere someone took the approach the browser took, but more on the native side? Make a runtime that can run a bunch of quasi-native code and make it download code from URLs and execute that. The experience for the user would be to type "myapp.com" on the URL bar and then get a full native app running inside that browser window -- except instead of bloated JavaScript it would be this new language thing with more powerful native-like APIs and without 32 years of bloated history on its back. I'm sorry if this is too confusing.
- tyingq 5y agoUnfortunately, not an option for iPhones: 3.3.2 An Application may not download or install executable code. Interpreted code may only be used in an Application if all scripts, code and interpreters are packaged in the Application and not downloaded You would have to ship a new copy of it with each application.
- d0mine 5y agoThere is Pythonista 3 for iOS which allows you to deploy code that is not shipped with the app e.g., it can be used to implement "download audio" button for youtube for iphone (and other supported by youtube-dl video sites)
- skaphy 5y agoThe program in the new language needs to be translated to native Android and iOS code directly in the "app-browser" right? Your idea sounds really interesting, but I imagine it being hard to combine the two different frameworks. Especially UI elements.
- fiatjaf 5y agoNo, it would run in a VM. Just like JavaScript of current browsers, but better.
- 5y ago
- ra1231963 5y agoTrying to use Python on the web or mobile is a lost cause. Use JS/TS or wasm generated from rust, that’s what is was built for. I regret spending time writing backend web frameworks in Python too. Most backends you’d hack together with Python can be built with TS and save you the headache of using PyPI along with npm, as well as rewriting your types, logic, and algorithms in multiple languages. Plus there are actual companies putting continued investment into V8 and react native, since their revenue depends on it. Python is a liability when it’s used in anything other than developer tooling. Everything in Python feels like it was made by some passionate oss devevelopers. Cool stuff, but not sustainable or ergonomic. The type system is kludgier than typescript’s and not as strong as rust’s. Python’s async APIs are embarrassing compared to JavaScript’s. Sadly this feels like one of those projects that should have been abandoned or pivoted before sinking so much energy into it. I love Python and still use it all the time. But for anything UI related I stay away.