Inspiration

I wanted to create a project that was very simple and straightforward - this is my first hackathon and I was coding on my own, so I decided to start very small and see what I could accomplish while still getting a full night of sleep. The challenge of coding with the Spotify API caught my eye: I have a little experience with Python and thought it would be a good opportunity to hone my skills a bit more. Besides, a good playlist makes all the difference when trying to finish coding assignments.

What it does

PalTunes is a simple terminal-based application. It uses the Spotipy API to authenticate users' Spotify logins, generates playlists based on three options (top tracks, top artists, and random genre recommendations) that then get saved to all the users' libraries. That way, everyone's tastes contribute a little to what is being played.

How we built it

The project was built on Python 3.10, using the PyCharm IDE, and the Spotipy API (link)

Challenges we ran into

Getting the API to connect to Spotify was the main issue - figuring out the correct authentication protocol took quite a lot of trial-and-error. Another big stone on my path was understanding the scope of what the API could accomplish. There were few examples of the correct base implementation of the methods online, meaning a lot of time was spent understanding the right parameters to be passed and how to interpret the json returns so that the right data was being manipulated at each stage. Generating the seeds for the recommendations did not always work and so some of my original plans for the program had to be changed to accommodate for this.

Accomplishments that we're proud of

This is my first hackathon, which is a huge accomplishment in its own right. I am also quite proud to have managed to complete a project dealing with an API in Python, given that most of what I have done with the language was object-oriented, and that I was able to achieve my personal goal of making something simple with less than twelve hours of coding.

What we learned

This was my first time using an API in Python, so I learnt how to set it up, how to use different authentication methods to connect to Spotify, how Spotify receives and sends out data using json, and also how third-party apps gain permission to interact with user accounts using specific scopes as to ensure safety and privacy.

What's next for PalTunes

I would like this to become a more robust recommendation system. Spotify already utilizes a rather complex AI to generate playlist and radio tracks, so I would like to take this information and implement it in a way that allows for the creation of collaborative playlists in a more interactive manner. Something I think would be fun given the purpose of the challenge would be to write playlist generation methods that take into consideration more immediate variables - things like party, study session, or road-trip playlists that match both the users' preferences and the genres related to the purpose behind the playlist (which can be done using the genre seeds already provided by Spotify, I believe). Integration with other applications and the creation of a GUI would be a neat bonus.

Built With

Share this project:

Updates