Questions tagged [kivy]

Kivy is an open source Python library for rapid development of cross-platform applications equipped with novel user interfaces, such as multi-touch apps.

is a library for the development of multi-touch enabled media-rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping while making your code reusable and deployable.

Kivy is written in Python, based on and supports different input devices such as Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on.

Kivy is actively being developed by a community and free to use. It operates on all major platforms (, , , , , ).

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

  • extensive input support for mouse, keyboard, TUIO, and OS-specific multitouch events,
  • a graphics library using only OpenGL ES 2, and based on Vertex Buffer Object and shaders,
  • a wide range of widgets that support multitouch,
  • an intermediate language Kv used to easily design custom widgets.

Kivy is the evolution of the PyMT project, and it is recommended for new projects.

UPDATE:

Kivy now supports Material Designs (inspired from Google) and is available via KivyMD .


icon Kivy Kivy


The main resource for information is the website. In addition, you can also check the Wikipedia entry for Kivy.

13657 questions
25
votes
5 answers

How to disable query cache with mysql.connector

I'm connecting mysql on my Kivy application. import mysql.connector con = mysql.connector.Connect(host='XXX', port=XXX, user='XXX', password='XXX', database='XXX') cur = con.cursor() db = cur.execute("""select SELECT SQL_NO_CACHE * from abc""") data…
kadir_cakir
  • 1,013
  • 1
  • 16
  • 22
25
votes
4 answers

Rounding button corners in Kivy

What is the preferred way to create rounded corners for buttons in Kivy? Are there other equally viable ways to perform this task?
James_L
  • 1,225
  • 5
  • 19
  • 26
24
votes
1 answer

TypeError: object.__init__() takes exactly one argument (the instance to initialize)

I am trying to make a form app and I don t understand the error: TypeError: object.__init__() takes exactly one argument (the instance to initialize) Code here; class Myapp(App): def build(self): return Grid1() class…
Alex Onel
  • 373
  • 1
  • 2
  • 9
22
votes
4 answers

How Can I Refer To Kivy's Root Widget From Python?

In Kivy language, it is possible to refer to the root widget with something like : BoxLayout: SomeButton: on_press: print root but trying to access root from Python is impossible class SomeButton(Button): …
Tan Wang
  • 811
  • 1
  • 6
  • 16
22
votes
3 answers

Is it possible to read from more than one .kv file in Kivy app?

I realize the short answer may be 'no,' but perhaps this is worth asking again. If I am witting a Kivy app with a couple thousand of lines - then would it be possible to write some classes in another kv file? This would make it so much easier to…
Edv Beq
  • 910
  • 3
  • 18
  • 43
22
votes
2 answers

Change button or label text color in kivy

I'm following this kivy book, and while I can understand how to change the background color of buttons, I haven't found the keyword to change the text color. I saw this and other questions. Here's my code: #!/usr/bin/kivy import…
Mittenchops
  • 18,633
  • 33
  • 128
  • 246
21
votes
7 answers

sdl2 - ImportError: DLL load failed: The specified module could not be found and [CRITICAL] [App] Unable to get a Window, abort

Python: 3.6.4 OS: Windows 10 Kivy: 1.10.0 Kivy Installation Method python -m pip install --upgrade pip wheel setuptools python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew python -m pip install…
Jaimie Dodd
  • 221
  • 1
  • 2
  • 4
21
votes
4 answers

How to exit a Kivy application using a button

I'm just learning Python and the Kivy framework. I can't seem to find any specific complete examples of being able to gracefully exit a Kivy app using code linked to a button. I have found Kivy code snippets like this Button: id:btnExit …
Ballew
  • 278
  • 1
  • 3
  • 8
21
votes
1 answer

Is there builtin way to get a ToggleButton group's current selection?

I was just browsing through the source in search of a way to do this but didn't see any. I want to be sure though, as I may have missed something. Is there a builtin way, like a method? When I have some ToggleButtons that are in a group together, I…
Totem
  • 7,189
  • 5
  • 39
  • 66
21
votes
2 answers

Python Kivy: Align text to the left side of a Label

I read the docs, and still don't know how to align the text inside a Kivy-Label to its left side. The text is centered from default. A halign = "left" didn't help. Sorry, if the solution is obvious, but I simply don't find it. EDIT: Example…
d0n.key
  • 1,318
  • 2
  • 18
  • 39
21
votes
2 answers

Difference between Kivy and Java for android apps

I'm a python developer with little experience creating android apps in java and want to create an app that will access my university web portal, retrieve some data and show on a view. So, after researching Kivy, I have a few questions: 1) Which one…
Guilherme David da Costa
  • 2,318
  • 4
  • 32
  • 46
21
votes
2 answers

How do I change the color of my widget in Kivy at run time?

I'm having trouble changing the color of a simple widget in Kivy. I can set the color when I create the widget, but I can't change it afterwards. Here is the simple layout definition file circletest.kv. It defines a circle where the color (actually…
Andy
  • 255
  • 1
  • 2
  • 8
20
votes
1 answer

How to get started/use matplotlib in kivy

I have recently learned a bit of matplotlib and would like to use it within kivy. I have read a little documentation on the garden here and there but don't really understand it. I have installed kivy garden and matplotlib but don't know how to…
user8216532
20
votes
15 answers

Kivy does not detect OpenGL 2.0

I have decided to do some programming in Kivy cross platform and installed Kivy on my computer successfully. The problem is that when I run my code, I get this error: [INFO ] [Kivy ] v1.9.1 [INFO ] [Python ]…
Matic Brank
  • 207
  • 1
  • 2
  • 6
20
votes
7 answers

How to configure Python Kivy for PyCharm on Windows?

I'm having trouble getting Kivy to work with PyCharm on Windows 7. I've managed to add most of the external libraries through File > Settings > Python interpreters > Paths Tab. I'm using the Kivy version of Python. When I run a Kivy app that works…
user2469456
  • 281
  • 1
  • 3
  • 8