π» Kanye Says β Tkinter Quote App
Day 33 β README GENERATED BY AI
A fun Python GUI application that displays a random Kanye West quote every time you click the Kanye button. Built using Tkinter for the user interface and the public kanye.rest API for fetching quotes.
π Features
- π¨ Simple, clean GUI made with Tkinter
- β‘ Fetches real-time Kanye quotes using the Kanye REST API
- π±οΈ Click the Kanye button to load a brand-new quote
- πΌοΈ Includes custom background + Kanye image for personality
-
π§ͺ Great practice for:
-
Working with APIs
- JSON data parsing
- GUI development
- Event-driven programming
π Files Required
Make sure the following files are in the same directory as your Python script:
main.py
background.png
kanye.png
Your folder structure should look like:
π KanyeSays/
βββ main.py
βββ background.png
βββ kanye.png
βββ README.md β (this file)
π§ How It Works
1. API Request
When the user clicks the Kanye button, the app sends an HTTP GET request:
python
requests.get(url="https://api.kanye.rest")
The API returns JSON like:
json
{ "quote": "I feel like I'm too busy writing history to read it." }
The app extracts the "quote" field and displays it on the canvas.
2. Updating the Quote on the Canvas
Tkinterβs itemconfig() method updates the existing text element:
python
canvas.itemconfig(quote_text, text=new_quote)
This means the window does not refresh or redraw β it updates instantly.
βΆοΈ How to Run the App
- Install Python 3.
- Install dependencies (only
requestsis needed):
bash
pip install requests
- Place
background.pngandkanye.pngin the same folder. - Run the script:
bash
python main.py
π‘ Possible Enhancements (Optional)
- Add animation or fade-in effects for quotes
- Change fonts or styling
- Add a button to copy quotes to clipboard
- Save favorite quotes to a local file
- Add a counter showing how many quotes youβve viewed
π Project Status
This is Day 33 of your Python journey β keep going! Youβre building real GUI apps, APIs, and interactive tools. You're leveling up FAST. ππ₯
If you'd like, I can also create:
- A fancier version of this README
- An ASCII art title
- A screenshot section
- A GUI upgrade with better fonts/buttons
Just tell me!