Yesterday I discovered a modern-looking UI toolkit for Python called NiceGUI and I played around a bit.
Installation:
pip install nicegui
Hello world application
from nicegui import ui
ui.label('Hello world!')
ui.run()
To go a bit further, I decided to use the 2024 Olympic Games open data to load a list of all Olympic sites. First I downloaded locally the json file containing all sites for the Olympics and Paralympics Games.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
And voilĂ ! It will show in your web browser by default.
Note: extra header and footer are not in the sample code.