From Wikipedia, the free encyclopedia
Jump to: navigation, search
The Kivy Showcase example
The Kivy Showcase example
Developer(s) Kivy organization
Initial release February 1, 2011; 5 years ago (2011-02-01)[1]
Stable release
1.9.1 / 1 January 2016; 9 months ago (2016-01-01)[1]
Development status Active
Written in Python, Cython
Operating system Cross-platform
Type Application framework
License MIT (Free software)

Kivy is an open source Python library for developing mobile apps and other multitouch application software with a natural user interface (NUI). It can run on Android, iOS, Linux, OS X, and Windows. Distributed under the terms of the MIT license, Kivy is free and open source software.

Kivy is the main framework developed by the Kivy organization,[2] alongside Python for Android,[3] Kivy iOS,[4] and several other libraries meant to be used on all platforms. In 2012, Kivy got a $5000 grant from the Python Software Foundation for porting it to Python 3.3.[5] Kivy also supports the Raspberry Pi which was funded through Bountysource.[6]

The framework contains all the elements for building an application such as:

Kivy is the evolution of the PyMT project, and is recommended for new projects.[8]

Code example[edit]

Here is an example of the Hello world program with just one button:

from import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        return Button(text='Hello World')


Kv language[edit]

The Kivy language (Kv) is a language dedicated to describing user interface and interactions. As with QML, it is possible to easily create a whole UI and attach interaction. For example, to create a Loading dialog that includes a file browser, and a Cancel / Load button, one could first create the base widget in Python, and then construct the UI in Kv.


class LoadDialog(FloatLayout):
    def load(self, filename): pass
    def cancel(self): pass

And in the associated Kv:

#:kivy 1.4.0
        size: root.size
        pos: root.pos
        orientation: "vertical"
            id: filechooser

            size_hint_y: None
            height: 30
                text: "Cancel"
                on_release: root.cancel()

                text: "Load"
                on_release: root.load(filechooser.path, filechooser.selection)


  1. ^ a b "Kivy changelog",, retrieved 2016-04-05 
  2. ^ "About us", 
  3. ^ "Python for Android", 
  4. ^ "Kivy for iOS", 
  5. ^ "Kivy and Python 3.3, project started", Google Groups 
  6. ^ "Kivy on Raspberry Pi", 
  7. ^ "Programming Guide » Kv language", 
  8. ^ "FAQ: How is Kivy related to PyMT?",, retrieved 2012-06-09 

External links[edit]