Create GUI App with Tkinter and SQLite - Step by Step Python Tutorial for Beginners
Python Simplified Python Simplified
240K subscribers
338,260 views
7.8K

 Published On Premiered Jun 15, 2022

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!!!):
Ā Ā Ā ā€¢Ā ConvertĀ GUIĀ AppĀ toĀ RealĀ ProgramĀ -Ā Ā Py...Ā Ā 
-----------------------------------------------------------------------------------------------------------

Download Starter Files (and Complete Project Files):
https://github.com/MariyaSha/RandomRe...

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:
Ā Ā Ā ā€¢Ā AnacondaĀ BeginnersĀ GuideĀ forĀ LinuxĀ an...Ā Ā 
ā­ SQLite Basics:
Ā Ā Ā ā€¢Ā SQLiteĀ BackendĀ forĀ BeginnersĀ -Ā Create...Ā Ā 
ā­ Web Scrape Databases with SQLite and Mechanical Soup:
Ā Ā Ā ā€¢Ā WebĀ ScrapingĀ DatabasesĀ withĀ Mechanica...Ā Ā 
ā­ Create simple GUI app with Tkinter:
Ā Ā Ā ā€¢Ā CreateĀ aĀ GUIĀ appĀ withĀ TkinterĀ -Ā StepĀ ...Ā Ā 
ā­ Create advanced GUI app with Tkinter:
Ā Ā Ā ā€¢Ā CreateĀ GUIĀ AppĀ withĀ TkinterĀ -Ā Ā PartĀ 2Ā Ā 

----------------------------------------------------------
ā°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:
Ā Ā /Ā discordĀ Ā 
šŸ”— LinkedIn:
Ā Ā /Ā mariyasha888Ā Ā 
šŸ”— Twitter:
Ā Ā /Ā 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/questions/7...
ā­ Beautiful icons:
flaticon.com

show more

Share/Embed