Up next

Autoplay

Create GUI App with Tkinter and SQLite - Step by Step Python Tutorial for Beginners

1 Views • 10/12/24
Share
Embed
121gamers
121gamers
14 Subscribers
14

Today we will create a highly sophisticated Tkinter application, which is PERFECT for beginners and even intermediate Python developers!! 💻💻💻
In this tutorial, we will:
⭐ connect an SQLite database of recipes to our app.
⭐ create a BEAUTIFUL graphic user interface with Tkinter.
⭐ randomly shuffle recipes and display them on the app.
⭐ preprocess table records.
⭐ use CUSTOM FONTS with Tkinter (works with Windows only).

I will guide you step by step, explaining each command, the logic behind it and even different approaches we can take!
This tutorial is designed especially for folks who are comfortable with Python but struggle to apply it in practice. Additionally, complete Python beginners will get all the instructions they need to keep up the phase! 😀

🛑🛑 Convert This App into a Professional Software 🛑🛑
-----------------------------------------------------------------------------------------------------------
Tutorial is now available (including a relational database fix!!!):
https://youtu.be/p3tSLatmGvU
-----------------------------------------------------------------------------------------------------------

Download Starter Files (and Complete Project Files):
https://github.com/MariyaSha/R....andomRecipePicker/bl

Install dependencies (Anaconda):
🐍 conda install -c anaconda tk
🐍 conda install -c anaconda pillow
🐍 conda install -c anaconda numpy
🐍 conda install -c conda-forge pyglet

Install dependencies (Pip):
🐍 pip install tkinter
🐍 pip install pillow
🐍 pip install numpy
🐍 pip install pyglet

----------------------------------------------------------
📽️ Other Related Tutorials of Mine 📽️
----------------------------------------------------------
⭐ Install Python with Anaconda:
https://youtu.be/MUZtVEDKXsk
⭐ SQLite Basics:
https://youtu.be/Ohj-CqALrwk
⭐ Web Scrape Databases with SQLite and Mechanical Soup:
https://youtu.be/MkGQmZoMuRM
⭐ Create simple GUI app with Tkinter:
https://youtu.be/itRLRfuL_PQ
⭐ Create advanced GUI app with Tkinter:
https://youtu.be/y8PR4lTAh5E

----------------------------------------------------------
⏰TIME STAMPS ⏰
----------------------------------------------------------
00:00 - intro
00:25 - starter files and wireframe
01:09 - create empty Tkinter window
01:33 - run Tkinter app
02:43 - set window title
02:58 - center window on the screen (Eval method)
04:00 - create Frame widget with custom width, height and background
05:32 - center window with Geometry method (alternative approach)
06:58 - create image widget
10:03 - center widgets in frame with pack propagate
11:01 - create Label widget
11:49 - fonts in Tkinter
13:20 - create Button widget
13:56 - change cursor to pointing hand
14:47 - button callback and why lambda is important
16:21 - add padding around widgets
17:05 - code refactoring
20:08 - connect SQLite database file
22:01 - database architecture walkthrough
23:54 - select all table names of a database with SQL
25:18 - fetch random database tables with SQL and NumPy
26:25 - fetch table records
27:56 - preprocess table name and records
30:09 - conditional list comprehension
34:45 - switch between frames
38:31 - remove widgets from frame
40:43 - sticky (remove white corners)
41:45 - label background in full window width
42:41 - use CUSTOM FONTS in Tkinter
43:24 - Pyglet
45:23 - Thanks for watching! :)

-------------------------------------------
🤝 Connect with me 🤝
-------------------------------------------
🔗 Github:
https://github.com/mariyasha
🔗 Discord:
https://discord.com/invite/wgTTmsWmXA
🔗 LinkedIn:
https://ca.linkedin.com/in/mariyasha888
🔗 Twitter:
https://twitter.com/mariyasha888
🔗 Blog:
https://www.pythonsimplified.org

-------------------------------------------
💳 Credits 💳
-------------------------------------------
⭐ Database web scraped from:
https://cosylab.iiitd.edu.in/recipedb/
⭐Switch between frames on StackOverflow:
https://stackoverflow.com/ques....tions/7546050/switch
⭐ Beautiful icons:
flaticon.com

Show more
0 Comments sort Sort By
Facebook Comments

Up next

Autoplay