I had the chance to use Kivy to build a GUI for my Master's thesis. I was always on the irc channel and yes the community is small but I always got the help I needed from the creators as well. It's easy to use once you get the grasp of it. I used it as a proof of concept but was pretty happy with the result. That was 9 months ago so I'm not up to date with the latest release though.
I've been writing a desktop application with Kivy for the past few months. It has pros and cons.
The biggest con I have found is that because it's geared mostly for mobile it doesn't natively support multiple windows. There are work around to this, including the way that I solved it here... https://medium.com/@PhilipAndrews/the-kivy-frontier-multiple....
But aside from that it's so easy to get a reasonably good looking application up and running.
Would I recommend it for cross-platform app development? I can't say with confidence.
For quick roll-out or prototyping? Yes, definitely.
I really hope this community grows over time. The people working on the framework have been very responsive when I've had questions.
I always keep my eye on the Play Store for any production apps using Kivy. It used to be the case that they all had a fairly unconventional (game-like) UI or a fairly clunky one.
Can anyone point me to a Kivy app that shows - if not totally native looking - at least a fairly standard approach to developing an Android UI?
(on the plus side - Kivy apps always seem smooth and responsive on Android)
I think it's still generally the case that Kivy apps tend to use the default (clunky) theme or something more custom, but there has recently been some user activity around alternatives, e.g. a set material design themed widgets (https://github.com/kivymd/KivyMD). I'm not sure if any apps using this have been published on the Play store.
We've been discussing how to include more unified themeing capabilities in Kivy itself, ideally as a big new feature in the upcoming 2.0 release.
Edit: I wrote a post at http://inclem.net/2016/01/15/kivy/kivy_android_app_showcase/ about some of the best published Kivy apps including themeing considerations, although they don't aim for a standard Android UI either. I see in your edit you've already seen this though.
This definitively looks interesting. I had previously tested kivy and only had little issues with pyjnius and font sizes as switching between versions. More modern looks sounds great, might the resurrect that old project.
Hi, I'm the main developer of KivyMD, very cool to see it pop up here!.
I must warn that it's still in alpha status, although being used to develop business applications. Any bug reports and PRs are appreciated, and anyone has any questions, just shoot!
I think game-like style is not typical for Kivy apps which do not aim to be games, though looking native has not been Kivy's goal either.
I've recently released Viorise, a video rank tracker aimed for desktop platforms (https://viorise.com), though it may also qualify as an Android UI, I've followed Material Design guidelines for most of the widgets and the overall layout of the app.
There have been some proposals for theming (https://github.com/kivy/kivy/issues/691), but none of them were truly favored by the community. There are also a couple of third-party approaches like KivyMD, or FlatKivy. What they lack is a swappable theme, since there is no true theming support, they are just styled widgets.
Finding a good way to make a declared theme independent from widgets, but still keeping it customizable at runtime has been our main issue. The difficulty comes from theming being much more than a backgorund color, we should also be able to define certain behaviors and interactions, animations etc. These are rather easy and IMHO pleasant to achieve in the scope of widgets, but we haven't yet found a good way to decouple them.
I'm using it to develop www.trebel.la, which will hopefully be out on the App Store this fall. But it also has a pretty unconventional (game-like) UI. IMO, if I wanted to build something that was well served by standard Android or iOS widgets, I would just write native apps. Kivy will never look or feel just like a native app, but since it has evolved from a game engine, it's a great choice for apps like mine that are part game, part standard UI.
Just to note, Kivy didn't evolve from a game engine, it began as PyMT (of which it's a spiritual successor) which was a gui toolkit targeting multitouch and NUI. In fact, the support for Android and iOS came later, and they work because the original design of the toolkit, with flexible backend providers and an opengl interface, did work out well for cross-platform use.
I do a lot of programming in Python, and found Kivy to be easy to use and thought it was pretty cool when I tried it out a while ago.
However: Why would one want to use Kivy for desktop interfaces (as I see many comments mention), rather than native (e.g. Qt) or at least close to native UI-frameworks?
I think Kivy looks great for prototyping, experimental interfaces, and such, but I don't see why I would use it over something that lets me use native interface widgets.
* I was making "universal" app for mobile and desktop.
* The app was intended for a Kiosk computer with touch screen.
* I was concerned about Qt licensing.
Kivy's multiplatform support is impressive. An application I'm working on at the moment runs in X on Ubuntu, on Microsoft Windows and on a Raspberry Pi 3. On the latter Kivy draws the UI using the frame buffer directly, without X.
Kivy does have its quirks and oddities. From the top of my head:
- Want to set the background color on a widget? Gotta drop into GL-like drawcalls and add a coloured rectangle below your widget.
- On the Raspberry Pi, I see a strange behaviour where adding and removing elements from the widget hierarchy causes widgets to randomly not appear, or flicker, or old widgets to re-appear — even though the widget hierarchy looks "clean" on inspection. This problem doesn't occur on Linux using X, or on Windows, so I suspect the reason lies somewhere in the frame buffer inplementation.
> Kivy's multiplatform support is impressive. An application I'm working on at the moment runs in X on Ubuntu, on Microsoft Windows and on a Raspberry Pi 3. On the latter Kivy draws the UI using the frame buffer directly, without X.
Isn't that the same as with most other multiplatform toolkits? GTK and Qt both support framebuffer rendering, IIRC.
Do you have a reference for GTK supporting FB rendering?
The best I could find was this:
> This current DirectFB GTK+ 3.12 port lacks drag and drop, selection support, cursor shapes, full-screen support, geometry hints, properties, and many other features, but according to the developers maintaining this out-of-tree GTK+ code it's "basically usable" for running modern GTK apps on DirectFB.
Have you visited their irc chan on freenode (#kivy)? The people who created Kivy are there and very responsive - I remember one of them answering me on the 25th of December. Granted the community is small but I found the people there very lovely to interact.
Might depend where you are based and when you go on IRC. I know that the Kivy team is based in Europe and tend to be online during working hours there. If you're based in the West coast for example you might log in only when they are all away - OK, if the community was a bigger that issue would be solved.
Compared with Qt and Tk for Python, where you have to manually code layouts (unless you use some layout generation tools, but they're all pretty iffy), how easy is it to design and code a form/screen/input/etc in Kivy?
I'd say it's really easy to create a form layout using the kv-language (which is yaml based and hooks into Python classes)
If you want to use somethimg else than the default theme however, you might need to do some extra work. As someone else commented, there is a material design theme, haven't used that myself though.
Can anyone comment on specifically how Kivy is better than the other options available (e.g., QT?). How have other peoples' experiences been?
Some comments say small community, but that seems like it could be a large drawback honestly. Does that mean, for example, there are few(er) stack overflow posts about it, and you are likely to run into some painful issues along the way? How well does it integrate with matplotlib? How easy is it to tweak its internal widgets to your liking?
QT is in every way a better choice, except for the license.
Kivy is great, fun to use, but it suffers for the same thing that many python applications do: package management is a pain, packing is difficult (especially dependencies with c libraries), applications are slow, there are no threads (any action locks the UI), the bridge to native code is quite troublesome (especially on IOS), it uses a custom DSL for UI layout and the 'non native' widgets can be clunky.
Don't get me wrong; it's a fun platform, but really have a good play with it before you decide to use it for anything serious, especially for mobile targets.
(QT isn't perfect either; but its a rock solid platform for building real applications in. Ultimately though, you should really suck it up and write native UI for each platform and only share underlying application logic; if you don't you're just going down the road of various different levels of clunkiness on every platform).
We were building a interface for a multi-touch table (9 meter per 1.2m) , so basically a device on which you could look on a lot of different angle, for which most GUI framework are not suitable as they have a strong opinion on what is "top" and what is "bottom" , while kivy easily permitted us to have different widget rotated
Possibly, but I've actually been hunting for a cross-platform, easy-to-build UI kit for Python, and this certainly seems easier than Tk or Qt. So it fits the bill for general cross-platform use ;-)
Why do you find this this easier than PyQt/PySide?
You can use Qt Creator to design interfaces graphically, and bundle and distribute your application with PyInstaller.
This will also let you use the given platform's native interface widgets.
I've never had any issue installing PyQt (or PySide) whatsoever, though I usually use Conda [1] with the Anaconda Python distribution, rather than the system default (which you shouldn't use, IIRC) or the official one from Python.org.
The easiest way to get started is probably with the Miniconda [2] Python distribution.
I'm not sure if Conda pulls down Qt, though, or if you have to install that yourself (e.g. via Homebrew).
This is not a criticism, but last time I looked at Kivy, the environment seemed pretty fragmented and documentation/ tutorials far from ideal. i.e. pretty immature.
How is it looking right now? Can anyone point me to some good docs and tutorials?
It's interesting that this showed up here today. I just installed qpython on my phone yesterday so that I could play with Python while I am on the subway. It has the Kivy libs built in. The only down side is that I haven't figured out a good way to get the docs available offline so I can refer to them on my phone as well.
You might think that coding on a phone is super painful, but it is surprisingly fun when there is nothing else to do.