https://github.com/hur/find-similar-artists
A Flask app that takes an artist name as an input and produces a Spotify playlist of songs by similar artists. Website down since Heroku free tier was shut down.
https://github.com/hur/find-similar-artists
Last synced: about 1 year ago
JSON representation
A Flask app that takes an artist name as an input and produces a Spotify playlist of songs by similar artists. Website down since Heroku free tier was shut down.
- Host: GitHub
- URL: https://github.com/hur/find-similar-artists
- Owner: hur
- Created: 2020-05-15T12:25:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-01T10:14:37.000Z (over 3 years ago)
- Last Synced: 2025-02-11T21:11:53.995Z (over 1 year ago)
- Language: Python
- Homepage: https://find-similar-artists.herokuapp.com/
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# find-similar-artists
A flask app that takes an artist as an input and generates a Spotify playlist of top songs of artists recommended based on the input.
Can use the Spotify API or https://music-map.com for sourcing the recommended artists.
Live demo at https://find-similar-artists.herokuapp.com/ (deprecated due to Heroku removing free tier)
## How to setup development environment
### Requirements
Python 3 & virtualenv (recommended)
### Steps
Clone the repository and cd into the directory:
```
git clone https://github.com/hur/find-similar-artists.git
cd find-similar-artists
```
Set up a virtual environment:
`virtualenv venv`
Activate the virtual environment:
```
(Windows / CMD):
venv\Scripts\activate
(Mac OS / Unix):
source venv/bin/activate
```
Install requirements:
`pip install -r requirements.txt`
Furthermore, you will need to install `redis-server` for your platform if you will host a development redis server locally.
Set up `.env` file with the needed keys:
```
SECRET_KEY = "yoursecretkey"
SPOTIFY_CLIENT_ID="clientid"
SPOTIFY_CLIENT_SECRET="clientsecret"
SPOTIFY_CALLBACK_URL="callbackurl"
REDIS_URL="redisurl"
```
You can generate a random secret key using Python:
```
>>> import uuid
>>> uuid.uuid4().hex
```
You need to create an app and get its client id and secret at https://developer.spotify.com/.
Furthermore, you need to add callback url for `localhost:5000/callback` and add it in the spotify dashboard as well as the .env
file.
Run the app using `flask run`. In some cases using `python -m flask run` instead may resolve issues that occur with `flask run`.
In another terminal tab, run an rq worker using `rq worker`. This will process the jobs sent to the task queue. Your redis server needs to be set up for this.
For running all tests, use `pytest`