Projects

Check out my code at my GitHub

______________________________________________

Spotify Application

This project is a Python application based on the Spotify web API. Luckily for me, although I am not familiar with making server requests for data and retrieving authorization tokens using JavaScript, I found a Python 3 package that implements all of the Spotify web API functionality in a single library. For more information, visit: Spotipy Documentation

Finished

The image above is my finished product. The left side is the Python shell through which you can control Spotify, and the right side is the GUI that I created. The GUI automatically updates 10 times per second, so it always displays the correct track informaton.

SITE

This is the inferface that allows the user to control their spotify playback. The above image lists the available commands that I created for controlling Spotify playback and also shows that process of adding a track to the user's queue.

SITE HTML

When all was said and done, I wrote about 500 lines of Python code for this project. Shown above are two examples of functions that I created to interface with the Spotify API. The top function asks the user for the name of an album to add, and then adds that entire album to the playback queue. The bottom function is used to authenticate user credentials when the program is first started.

SITE HTML

The code implementing the graphical aspect of this project was much more simple. Shown above is an excerpt from the Python script used to display the GUI (which uses a modified version of the Tkinter library).

SITE HTML

NOTE: After a few weeks, I returned to add additional functionality. I created a PHP script on my website that transferes an input from an HTML form into a MYSQL database. Then, my Python script accesses this data and uses it to add songs to the Spotify queue (right image). As a result, anyone who visits the JS Apps tab of my website can add songs to my Spotify queue.

Check out the complete code for this project here.