Kivy Crash Course Introduction & Installation

This is our first article on Kivy Crash Course, in this article we are going to talk about Kivy Introduction & Installation. Kivy is an open source, cross-platform Python framework for the development of applications that make use of innovative, multi-touch user interfaces. The aim is to allow for quick and easy interaction design and rapid prototyping whilst making your code reusable and deployable. Kivy is written in Python and Cython, based on OpenGL ES 2, supports various input devices and has an extensive widget library. With the same codebase, you can target Windows, macOS, Linux, Android and iOS. All Kivy widgets are built with multitouch support.

 

 

 

Also you can watch the video for this article

 

 

 

Read more articles on Python GUI Development

1:  PyQt5 GUI Development 

2:  TKinter GUI Development 

3:  Pyside2 GUI Development

4:  wxPython GUI Development

 

 

 

Installation 

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

 

 

for installation of other operating systems you can check their documentation, Kivy Installation.

 

 

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

so just in the top 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.

 

 

Python Kivy Crash Course
Python Kivy Crash Course

 

 

 

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

 

OK 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 will be the result

Kivy Crash Course Introduction & Installation
Kivy Crash Course Introduction & Installation

 

 

 

 

 

 

 

 

 

Subscribe and Get Free Video Courses & Articles in your Email

 

Codeloop
Share via
Copy link
Powered by Social Snap
×