Coders Packet

Clock API in Python using Kivy module

By Aritra Banerjee

A GUI based digital clock API made using Kivy module in Python. It shows the time in 24 hour format and there is also a stopwatch feature available.

Clock API in Kivy

The clock is a common feature in many electronic devices of daily use like laptops and phones. The above font is used to give it a look of a digital clock. 

Stopwatch is a very common function that is available in a variety of devices like wristwatches, laptops, and phones. It mainly helps in observing the time taken for a particular task. Since the above stopwatch displays milliseconds, it can be used for measuring until a certain level of precision.

Steps to install Kivy in Ubuntu:

1) sudo add-apt-repository ppa:kivy-team/kivy

2) sudo apt-get update

3) sudo apt-get install python3-kivy

While running the code, there might be an error like ModuleNotFoundError: No module name 'kivy._clock'

So, to resolve that, please follow this link .

After extracting the folder:

1) cd Clock_APP/

2) python3 main.py

 

The folder contains:

1) Let_s_go_Digital_Regular.ttf  (font files for displaying the numbers for displaying text)

2) buttons/ folder where images of the different buttons (for START, STOP, and RESET are present)

3) main.py (main module of the code)

4) clock.kv (a Kivy file for styling the background, buttons, and text)

Download project

Reviews Report

Submitted by Aritra Banerjee (abanerjee)

Download packets of source code on Coders Packet