I built a simple Django app that grabs your top 50 spotify songs and save them on a sqlite3 database, this will be used for train a ML model that can tell your personality type based on your likes.
- python 3.0+
- Django 3.0+
- A Spotify Developer account (Is free)
- A Spotify App
To get ready just follow the instructions.
- Clone the project repository:
git clone https://github.com/BubuDavid/Spotify-API-Top-User-Tracks.git
cd Spotify-Api-Top-User-Tracks
- You can create an environment with
virtualenv -p python .
and activate it with:
# Windows
Script/activate.bat
# IOS
source spotify-top/bin/activate
or with conda by typing
conda create -n spotify-top
and activate it whith
conda activate spotify-top
- Install the requirements
(pose-estimation)$ pip install -r requirements.txt
-
Remember to set your client_id and client_secret from you spotify app, you can use enviroment variables or a .env document. If you do not know how to create an app, follow this tutorial.
-
Set your redirect_uri to http://localhost:8888/callback inside your app settings on spotify developer.
-
And to run the app you can do
python manage.py runserver 8888