Music Player is a Python desktop music player application built using Tkinter and Pygame, with integration of the Spotify Web API to search songs online. The application allows users to:
- Import and play local MP3 files
- Search songs online via Spotify
- View search history
- Maintain a playlist of imported songs
- Control playback and volume through a graphical interface
This project demonstrates skills in Python GUI development, API integration, file handling, and multimedia playback.
- Import songs from a folder
- Play MP3 files using the Pygame mixer
- Maintain a playlist of imported songs
- Search for songs using the Spotify Web API
- Automatically opens the song in the user's browser
- Saves search history including:
- Song name
- Artist
- Spotify link
The program stores information using binary files:
songs.dat- imported songshistory.dat- Spotify search historyinfo.dat- project information
Built using Tkinter, providing:
- Play / Pause controls
- Volume adjustment
- Playlist management
- Song search field
- History and imported songs viewer
- Python
- Tkinter – GUI interface
- Pygame – Music playback
- Spotipy – Spotify API wrapper
- PrettyTable – Display formatted tables
- Pickle – Binary data storage
This project uses the Spotify Web API to search songs.
Before running the program, you must create a Spotify Developer Application.
Go to the Spotify Developer Dashboard:
https://developer.spotify.com/dashboard/
Log in using your Spotify account and click Create App.
After creating the app, Spotify will provide a Client ID and Client Secret. Copy these values.
Inside the Spotify app settings, click Edit Settings and the following redirect URI:
http://localhost:8888/callback
Save the settings.
Locate this section in the code:
clientID = 'Your client ID'
clientSecret = 'Your client secret'
redirect_url = 'Your redirect url'Replace it with your Spotify credentials:
clientID = 'YOUR_SPOTIFY_CLIENT_ID'
clientSecret = 'YOUR_SPOTIFY_CLIENT_SECRET'
redirect_url = 'http://localhost:8888/callback'- Click Browse Music
- Select a folder containing
.mp3files - The songs will appear in the playlist panel
- Select a song from the playlist
- Click the Play button to start playback
- Enter a song name in the search bar
- Click Search Online
- The song will open in your browser via Spotify
Click the History icon to view previously searched songs.
This project highlights experience in:
- Python GUI development using Tkinter
- API integration using the Spotify Web API (Spotipy)
- File handling and data persistence using Pickle
- Multimedia playback using the Pygame mixer
- Desktop application design and user interface development
- Working with external libraries and APIs

