Kivy Tutorials
About Lesson

In this Kivy Tutorial we are going to talk about Introduction & Installation of Kivy, we will have a simple introduction to Kivy and after that we learn about installation process at the end we create a simple example.



What is Kivy ?

Kivy is Open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. you can run the same code on all supported platforms. It can natively use most inputs, protocols and devices including WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, Mtdev, Linux Kernel HID. Kivy is 100% free to use, under an MIT license, The toolkit is professionally developed, backed and used. You can use it in a commercial product. the framework is stable and has a well documented API, plus a programming guide to help you get started.




You can simply install kivy with  pip, if you are using windows. also before installation you need to install the dependency for kivy, after that install kivy.



Now let’s create our first window in Kivy, so this is the code for creating our first basic window in kivy.


We have imported the App class from kivy, after that we have created the object of our App class, and this App class is the initial point for creating of our window. and after you need to just run your app object. after run you will see this result.




Run the code and this is the result.

Kivy Tutorial - Introduction & Installation of Kivy
Kivy Tutorial – Introduction & Installation of Kivy




So now let’s extend our code and also create a label widget in Kivy.


in the above code you can see that first we have imported our required classes from kivy, basically we are going to use App class with Label class. after that we have created our window class that extends from app class. the app class is the starting point of any kivy application.



This method returns the window content. in this case a simple colorful label saying Hello Kivy Application.





Run the complete code and this is the result.

Introduction & Installation of Kivy
Introduction & Installation of Kivy