Professional Documents
Culture Documents
Kivy is a Python library for development of multi-touch enabled media rich applications which can be installed on
different devices. Multi-touch refers to the ability of a touch-sensing surface (usually a touch screen or a trackpad)
to detect or sense input from two or more points of contact simultaneously.
class Test(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
Test().run()
Explanation
The above statement will import the parent class app. This will be present in your installation directory
your_installtion_directory/kivy/app.py
The above statement will import the ux element Label. All the ux element are present in your installation directory
your_installation_directory/kivy/uix/.
class Test(App):
The above statement is for to create your app and class name will be your app name. This class is inherited the
parent app class.
def build(self):
The above statement override the build method of app class. Which will return the widget that needs to be shown
when you will start the app.
The above statement is the body of the build method. It is returning the Label with its text Hello world.