Mode:
Duration:
1
Coding works best on desktop or with an external keyboard.
Coding works best on desktop or with an external keyboard.
A simple Todo app built with Kivy allowing users to add and view tasks.
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
from kivy.uix.label import Label
class TodoApp(App):
def build(self):
self.tasks = []
self.layout = BoxLayout(orientation='vertical', padding=20)
self.input = TextInput(hint_text='Enter task')
self.layout.add_widget(self.input)
self.add_btn = Button(text='Add Task', on_press=lambda x: self.add_task())
self.layout.add_widget(self.add_btn)
self.task_box = BoxLayout(orientation='vertical')
self.layout.add_widget(self.task_box)
return self.layout
def add_task(self):
task = self.input.text.strip()
if task:
self.task_box.add_widget(Label(text=task))
self.input.text = ''
if __name__ == '__main__':
TodoApp().run()Kivy is an open-source Python framework for building cross-platform multitouch applications on Android, iOS, Windows, macOS, Linux, and Raspberry Pi. It provides a UI toolkit, gesture support, animations, layouts, and a declarative KV language for rapid app development.
Origin & Creator
Kivy was created by Mathieu Virbel and the Kivy Organization, evolving from the PyMT project and released publicly in 2011 as a modern Python GUI + mobile app framework.
Industrial Note
Kivy is especially loved in education, research environments, rapid prototyping, Raspberry Pi projects, and Python-first development teams requiring cross-platform touch UIs.