
Kivy – Open-source Python library for rapid development of applications - albertzeyer
http://kivy.org/
======
revskill
I've tried it, but the resulted built size is huge. How could a Hello World
application (built for android) took 15 minutes to build, and about 60MB in
size ?? Why not those measurement been told in the main site to tell other to
try and use ?

~~~
anewhnaccount
The actual apk can be as small as 5-6mb, but yes it's too big. Ideally common
files to all Kivy applications (the python runtime and libraries) would only
exist once, but that's a problem people can't quite agree how to solve.
[https://github.com/kivy/python-for-
android/issues/202](https://github.com/kivy/python-for-android/issues/202)

~~~
rplnt
I'm pretty sure apps can have dependencies, so that looks like the best
solution. Yes, users will be annoyed, but I think it's still better than
various other "hacks".

~~~
eric_bullington
QT has tried that on Android and it's an exceedingly poor solution. Almost no
user will click to download additional files -- they've been (rightfully)
conditioned to view this as a suspicious technique.

As long as you blacklist unneeded libraries on Kivy, you can get the size down
to 5 - 10 MB. I personally don't believe this download size is such a problem
for users (many native Java apps are upwards of 5 MB).

What _is_ a problem is the start-up time and battery usage, both much harder
problems to address. Because they require the Python interpreter, Kivy apps
take significantly longer to start-up, and use significantly more battery
power than Java apps. I have some hope that Micropython may eventually offer a
solution to this for Python on Android, although porting Kivy to Micropython
will be a major task.

~~~
thirtman
I think startup time has good for very annoying, with android devices of 3
years go, to nearly forgettable, with more modern, high-end devices. I've
witnessed nearly instant startups, with devices as the Note 2, not saying it's
a solved problem, the cpu speed and even more the read/write speed of the
internal storage will have a lot of impact especially on the first start
(unpacking python and deps).

For battery usage, i'd love to see data for this, i think drain will come from
the amount of action you put in your interface, as well as background
processing you'll do, kivy itself, being opengl and cautious about what to
update when changes happen, shouldn't add a lot of overhead on this.

I don't think porting to micropython is considered an option, usually, when we
want more efficient code, the solution is to do less python, more C, we have a
nice integration with Cython, and don't hesitate to go with it as soon as
needed.

~~~
thirtman
"has gone from" >_<.

------
vdfs
2048 app that use Kivy on android
[https://play.google.com/store/apps/details?id=com.meltingroc...](https://play.google.com/store/apps/details?id=com.meltingrocks.kivy2048)

------
JasonFruit
I have a couple hymnal apps in the Play Store built with Kivy, and reviews
suggest that performance is a problem for some people, especially scrolling
through long views. I'm in the process of rewriting them using HTML and
JavaScript in a WebView.

That being said, Kivy is really nice to work with; the documentation is good
and it's a well thought-out library. I'd enjoy using it for future apps that
don't happen to have long views to scroll through.

~~~
thirtman
Did you use ListView, or did you roll your own ScrollView managed content? We
are sorry about the state of ListView currently, and plan to redesign it soon,
it's really not optimal currently, and not offering a very useful interface
either, so maybe you could fix you issues just putting a GridLayout in a
ScrollView and fill it as needed (i documented a way to do a
publisher/consumer using threads on my blog, it's efficient for these kind of
things).

[http://blog.tshirtman.fr/2014/1/14/publisher-consumer-
model-...](http://blog.tshirtman.fr/2014/1/14/publisher-consumer-model-in-
kivy)

~~~
JasonFruit
Initially I used the ListView, but found performance problems on every device.
I then rolled my own using a layout in a ScrollView, and it's better, but
still troublesome. I'll compare what I've done to what you wrote about and see
if I can improve matters.

------
bharatkhatri14
I've always been confused about open-source projects that go big on marketing
themselves.

Building a good community around open-source projects holds obvious advantages
as you'd always need contributors to push the project through its future
generations.

As far as I can see, Kivy is supported by a group of independent developers.
Kivy (as a group) must have spent money in marketing the product, launching
developer contests, publishing books on Kivy (I've seen a couple books on Kivy
by O'reilly), and other stuff. I'm just curious to know in what other ways,
apart from the need to grow the community around your project, does marketing
your open-source project help? And is the money put into marketing the project
contributed by the creators themselves?

~~~
inclemnet
> Kivy (as a group) must have spent money in marketing the product

I don't think kivy (as a group) does anything except recently the contest, and
things like maintaining a g+ account, mailing list, posting on hn or reddit if
something intersting happens etc. - were you thinking of anything in
particular here?

> launching developer contests

This was funded entirely from sponsorship, you can see the list on the contest
page ([http://kivy.org/#contest](http://kivy.org/#contest)).

> publishing books on Kivy (I've seen a couple books on Kivy by O'reilly)

Publishers commission books because they think they will make money, not
because kivy pays them to - actually, I don't think any of the core developer
team have been directly involved in kivy books.

> and other stuff

Honestly, not really - I can't think of any other expenses except small things
like powering the website server.

> I've always been confused about open-source projects that go big on
> marketing themselves.

I don't think kivy is really big on marketing itself - if anything, maybe the
opposite. I've wondered before if its relatively unknown status (compared to
phonegap etc) is at least partly because we don't advertise much, though it
may just as well be that more people are interested in html.

Things like the developer contest are great to build interest and get the word
out that kivy exists, and as you said yourself have obvious advantages in
maintaining and growing the community - if this is 'going big' on marketing, I
don't think that term is very meaningful.

~~~
thirtman
I confirm there was no money directly spent on promoting kivy. Most of our
communication has been directly with the community, through help on
irc/google-groups/SO and other places. We did start to improve communication
on twitter/g+/facebook, but it's really on our own time, not paying any agency
or specialist of these things.

For books, while we were contacted by a few publishers, none of the core-dev
authored any, yet. We tried to give a hand, however, reviewing the books when
we could, i personnaly reviewed O'Reilly's book, pointing out a few mistakes
to the editor, and gave it a good review, as it was, in my opinion, a well
written book with very good exemples and explanations. As it seems usual, i
got a free book and a little payment for this (that i didn't expect at all
when doing it, my motivation was that there was a need for good kivy books).

And i agree we should do more, if not on marketing, at least on communication
(there are a few markets that kivy can fully or partially cover already, we
don't want to limit these options, just help it grow where users want to use
it), but users need to know about it, and to easily get a good understanding
of what's possible to do with it. We have a lot of recurring questions about
that, as well as people discovering us and asking why they didn't heard about
us sooner.

I do think the community could be way bigger, but we need to adapt the tools
we use to communicate, irc works very well up to the hundred of connected
users we have, probably less at more, and waste a lot of energy in saying the
same things over and over again (although the direct interaction with our
users is highly appreciable), SO seems to make reuse of explanations much more
common, and is sometime more effective than direct documentation.

Anyway, i'm getting away from the point, will cut it there. :)

~~~
samuell
What about a Google group? That is, basically a mailing list, but without the
mails, for those (such as me) who get too much mail already. Google groups is
the best form of community communication out there if you ask me.

... and, maybe a "community" link on the kivy page, to quickly find out how to
get in touch with others in the community. Would help a lot I think.

~~~
inclemnet
We actually do have a google group (actually more than one) -
[https://groups.google.com/forum/#!forum/kivy-
users](https://groups.google.com/forum/#!forum/kivy-users) is the most active,
and works well. Maybe we need to make that clearer as well!

------
daGrevis
Here's an application my co-worker built using Kivy.
[https://github.com/aigarius/photoriver](https://github.com/aigarius/photoriver)

------
albertzeyer
I found this in my logs from 2013 and it looks really nice now.

Another example app with Kivy + SQLite: Image Viewer and Organizer,
[https://github.com/gau-veldt/ImageOrg](https://github.com/gau-veldt/ImageOrg)

This is also interesting:
[http://libnui.github.io/nui3/](http://libnui.github.io/nui3/) I'm not exactly
sure anymore about the relation. Is Kivy based on libnui?

~~~
meelooo
Kivy looks very nice but NUI is a very different beast (I'm the author). The
main difference being that even though NUI is a complete multi-plateform
framework that uses OpenGL for rendering, it has a strictly C++ API.

If you want to see apps built with NUI I just released reChord:
[http://bit.ly/rechord](http://bit.ly/rechord) And also some very nice music
apps with NUI:
[http://intua.net/products/beatmaker2/](http://intua.net/products/beatmaker2/)
[http://www.whitenoiseaudio.com/apps/genome-midi-
sequencer/](http://www.whitenoiseaudio.com/apps/genome-midi-sequencer/)
[http://www.whitenoiseaudio.com/apps/bleepbox/](http://www.whitenoiseaudio.com/apps/bleepbox/)

~~~
albertzeyer
In the GitHub description
([https://github.com/kivy/kivy](https://github.com/kivy/kivy)), it says about
Kivy:

"Open source software library for creating NUI applications, running on
Windows, Linux, MacOSX, Android and iOS"

I guess that is why I searched for NUI and I probably found your lib. I don't
remember that I have heard that term "NUI" before.

~~~
meelooo
I've been using the name for 13 years or so but a number of other libs started
using the acronym unfortunately (New UI, Natural UI, etc.). I should have been
more vocal and public about the lib from the beginning :-).

------
chadillac
Messed with Kivy about 6 months ago, while I love what it is, it suffers from
PyGame'ism. Yes you can write games and such, but the end result always just
feels bloated and performance hungry. I ended up going with Corona
([http://coronalabs.com/](http://coronalabs.com/)), and it is/was awesome for
the game I was building.

------
arstudio
I wrote a Kivy app for a multi-touch table a few years ago as my Masters
project in CSE.

I appreciated being able to develop on my Mac, run it on the table using
Windows, and even got it running on an iPad.

Getting the environment set up to deploy to iOS was complex (especially cross
compiling non-standard Python libraries), but it has been a few years.

------
pacofvf
Is there any plotting library I can use with Kivy?, something of the likes of
D3.js
([http://github.com/mbostock/d3/wiki/Gallery](http://github.com/mbostock/d3/wiki/Gallery))

~~~
jardaroh
matlibplot is one of the best and most extensive plotting libraries. You also
have d3py that is a d3.js implementation in python. Do a google search for
python graph or python plot and you will find plenty.

------
nemesisj
Anyone tried Kivy for game development? I'm interested in brushing up my
Python and was thinking about making a game that could be OpenGL accelerated,
and it seemed like a good match.

~~~
thirtman
Yes, you can see examples of games done with kivy in the two contests
(kivy.org/#contest), and there are also a few games on the market, it's also
interesting to look at kovak's efforts on kivent.org, a 2D game engine built
on top of kivy and cymunk, which seems like the way to go for games with a lot
of actors.

~~~
nemesisj
Cool, thanks! I'll have a look at that. Does the kivent.org stuff support
Tiled?

~~~
inclemnet
I don't think it does right now, but it should be pretty easy to add this kind
of support.

~~~
thirtman
There has been at least one user working on it, for kivy, so maybe it'll
available soon, either as 3rd party package, or as a PR to either project
(though it would probably make more sense on kivent).

------
kitd
Nice.

I may try this on my daughter who has been asking to get into programming. I
remember the buzz I got building simple visual apps in VB. This feels similar.

------
__Joker
Anybody knows of any app built for iOS using Kivy ?

~~~
inclemnet
There's a (probably not exhaustive) list at
[https://github.com/kivy/kivy/wiki/List-of-Kivy-
Projects#kivy...](https://github.com/kivy/kivy/wiki/List-of-Kivy-
Projects#kivy-apps-in-the-apple-app-store) .

------
MrBra
Would it be correct to say that Kivy is the Python equivalent for Ruby Shoes?
In which aspect the one or the other is more powerful?

~~~
aikah
Can you write IOS and Android Apps with shoes?

~~~
MrBra
They won't be native apps anyway but browser based apps, so as new Shoes is
going to use Javascript (via Opal) and HTML as a rendering engine, then yes
you can. Any other actual differences or points of strength worth noting?

------
gadders
Apart from the size issues mentioned below, how does this work on Android? Is
it better than PhoneGap etc and closer to native apps?

~~~
inclemnet
It compiles the python interpreter for android/arm, then bundles this all
together in an APK - along with much of the standard library and any extra
modules the user wants. It also includes a java bootstrap app that interacts
with the system, but does essentially nothing except initialise and display an
opengl surface that kivy renders to - along with running the python
interpreter on the user's kivy code.

This bootstrap is invisible to the user, you don't need to touch the java to
use kivy. That said, kivy has some cool sister projects for using the normal
java api - pyjnius for accessing java classes directly from python, and more
recently plyer to provide a more pythonic wrapper to common things like
vibration, sensors etc.

(The above is also mostly the same for the ios build process).

> Is it better than PhoneGap etc and closer to native apps?

I would say more that it is just different, with advantages and disadvantages
of its own. It doesn't use native widgets (though it's possible to create and
use them in some ways with pyjnius), so it isn't different in this sense.

------
therealmarv
I think for 2D related apps/games which do not require the native OS UI
controls this is a good choice.

------
aikah
I never was able to run it on my computer unfortunatly(mackbook
,bootcamp,windows 7).

But it looks great.

