CCNY_Database_Project

This project can be used to track your albums that you have collected in the form of physical media. It uses Spotify data via the Spotipy library to search albums. MySQL and Flask are used for the backend.

Requirements

Instructions to run on your computer

  1. Set up python virtual environment:

    Create environment:

    python3 -m venv env

    Activate environment:

    • on Windows:

      env\scripts\activate
    • on Mac:

      env/bin/activate
  2. Install required packages:

    pip install -r requirements.txt
  3. Run project_schema.sql in MySQL workbench to create database and tables.

  4. In flask_app folder, create a .env file with the following variables:

    Key of your choice

    SECRET_KEY =

    Your MySQL login credentials. DATABASE_HOST is most likely localhost and DATABASE_USER is most likely root.

    DATABASE_HOST = 
    DATABASE_USER = 
    DATABASE_PASS = 
    DATABASE_SCHEMA = csc336_project

    Create an app in your Spotify developer dashboard and use the client id and client secret from that app.

    SPOTIFY_CLIENT_ID = 
    SPOTIFY_CLIENT_SECRET = 
  5. In ccny_database_project folder run:

    py run.py