Kivy (framework)

Free and multi-platform graphical library for Python


title: "Kivy (framework)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["cross-platform-mobile-software", "cross-platform-software", "free-software-programmed-in-python", "python-(programming-language)-libraries", "software-using-the-mit-license"] description: "Free and multi-platform graphical library for Python" topic_path: "general/cross-platform-mobile-software" source: "https://en.wikipedia.org/wiki/Kivy_(framework)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Free and multi-platform graphical library for Python ::

::data[format=table title="Infobox software"]

FieldValue
nameKivy
logoKivy logo.png
logo size140px
screenshotKivy showcase screenshot.jpg
screenshot size250px
screenshot altThe Kivy Showcase example
captionThe Kivy Showcase example
developerKivy organization
programming languagePython, Cython
operating systemCross-platform
genreApplication framework
licenseMIT (Free software)
website
repo
released
latest release version2.3.1
latest release date
urlhttps://github.com/kivy/kivy/releases/tag/2.3.1
titleKivy 2.3.1
author
date2024-12-26
websitegithub.com
access-date2024-03-22
latest preview version
latest preview date
urlhttps://github.com/kivy/kivy/releases/tag/2.3.0rc3
title2.3.0rc3
date2024-01-01
websitegithub.com
access-date2024-03-22
::

| name = Kivy | logo = Kivy logo.png | logo size = 140px | screenshot = Kivy showcase screenshot.jpg | screenshot size = 250px | screenshot alt = The Kivy Showcase example | caption = The Kivy Showcase example | developer = Kivy organization | programming language = Python, Cython | operating system = Cross-platform | genre = Application framework | license = MIT (Free software) | website = | repo = | released = | latest release version = 2.3.1 | latest release date = | url=https://github.com/kivy/kivy/releases/tag/2.3.1 | title=Kivy 2.3.1 | author= | date=2024-12-26 | website=github.com | access-date=2024-03-22 | latest preview version = | latest preview date = | url=https://github.com/kivy/kivy/releases/tag/2.3.0rc3 | title=2.3.0rc3 | date=2024-01-01 | website=github.com | access-date=2024-03-22

Kivy is a free and open source Python framework for developing mobile apps and other multitouch application software with a natural user interface (NUI). It is distributed under the terms of the MIT License, and can run on Android, iOS, Linux, macOS, and Windows.

Kivy is the main framework developed by the Kivy organization, alongside Python for Android, Kivy for iOS, 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. Kivy also supports the Raspberry Pi which was funded through Bountysource.

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

Kivy is an evolution of the PyMT project.

Code example

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

::code[lang=python] from kivy.app import App from kivy.uix.button import Button

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

TestApp().run() ::

Kv language

The Kv language is a language dedicated to describing user interface and interactions in Kivy framework. As with other user interface markup languages, 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.

In main.py: ::code[lang=python] class LoadDialog(FloatLayout): def load(self, filename): pass def cancel(self): pass ::

And in the associated Kv: ::code[lang=yaml] #:kivy 1.11.1

: BoxLayout: size: root.size pos: root.pos orientation: "vertical"

    FileChooserListView:
        id: filechooser

    BoxLayout:
        size_hint_y: None
        height: 30

        Button:
            text: "Cancel"
            on_release: root.cancel()

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

::

Alternatively, the layout (here, Box Layout) and the buttons can be loaded directly in the main.py file.

Related projects

Google Summer of Code

Kivy participated in Google Summer of Code under the Python Software Foundation.

  • Kivy in GSoC'2014.
  • Kivy in GSoC'2015.
  • Kivy in GSoC'2016.
  • Kivy in GSoC'2017.

References

References

  1. "Kivy changelog". kivy.org.
  2. "About us". kivy.org.
  3. "Python for Android". github.com.
  4. "Kivy for iOS". github.com.
  5. "Kivy and Python 3.3, project started". Google Groups.
  6. "Kivy on Raspberry Pi". bountysource.com.
  7. "Programming Guide » Kv language". kivy.org.
  8. "FAQ: How is Kivy related to PyMT?". kivy.org.
  9. "Google Summer of Code 2014 @ the Python Software Foundation".
  10. "Google Summer of Code 2015 @ the Python Software Foundation".
  11. "Google Summer of Code 2016 @ the Python Software Foundation".
  12. "Google Summer of Code 2017 @ the Python Software Foundation".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

cross-platform-mobile-softwarecross-platform-softwarefree-software-programmed-in-pythonpython-(programming-language)-librariessoftware-using-the-mit-license