Kivy

2.3.1 · active · verified Thu Apr 16

Kivy is an open-source Python framework for developing GUI applications that run cross-platform, including desktop (Windows, macOS, Linux), mobile (Android, iOS), and embedded platforms. It facilitates rapid prototyping and easy interaction design, supporting multi-touch applications with a reusable codebase. Kivy is released under the MIT License, actively developed by a strong community, and is currently at version 2.3.1.

Common errors

Warnings

Install

Imports

Quickstart

This minimal Kivy application creates a simple window displaying 'Hello, Kivy!'. It defines an `App` subclass, overrides the `build` method to return a `Label` widget, and then runs the application instance. The `kivy.require()` call is a good practice to ensure compatibility with your current Kivy version.

import kivy
kivy.require('2.3.1') # specify the Kivy version you're using

from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):
    def build(self):
        return Label(text='Hello, Kivy!')

if __name__ == '__main__':
    MyApp().run()

view raw JSON →