/PlaylistSorter

This application will sort a Spotify playlist based on a certain attribute.

Primary LanguagePythonMIT LicenseMIT

Table of Contents

About
Tools Used
Getting Started
License

About The Project

Spotify Sorter

This application sorts user's Spotify playlist based on any of the following attributes:

  • Name of the Song
  • Name of the Artist
  • Duration of the Song
  • Popularity

Visit Deployed Version

Tools Used

Getting Started On Windows

Creating Repo and Installing Dependencies (Part 1)

  1. Clone the repository. git clone https://github.com/SinghxRaj/PlaylistSorter.git

  2. Install virtualenv so that you can create your virtual environment (If not installed yet). pip install virtualenv

  3. Create your virtual environment. Make sure your inside your PlaylistSorter. virtualenv venv

  4. Activate your virtual environment. venv/Scripts/activate

  5. Install dependencies which are stored in requirements.txt: pip install -r requirements.txt

Creating a Spotify App (Part 2)

  1. Go to Spotify Dashboard
  2. Login in and click Create An App
  3. Give it any name and description and then click create.
  4. Click on Edit Settings
  5. Go under Redirect URIs and add http://127.0.0.1:5000/callback
  6. Optionally, under Redirect URIs you can add the following:
    • http://127.0.0.1:5000/callback/
    • http://localhost:5000/callback/
    • http://localhost:5000/callback
  7. Save settings and copy the Client ID and Client Secret which are needed to set the environment variables.

Setting Environment Variables (Part 3)

  1. Set the following environment variables in the terminal.

set SPOTIFY_CLIENT_ID=<client_id>

set SPOTIFY_CLIENT_SECRET=<client_secret>

set SECRET_KEY=<any_string>

Run Application (Final Part)

  1. To run the application. flask run

License

Distributed under the MIT license. See LICENSE for more information.