Create a Topster-style canvas of your top Spotify music.
To use the Spotify API, you must set the following environment variables before running the application (locally or in Docker):
| Variable | Description | Default Value |
|---|---|---|
SPOTIFY_CLIENT_ID |
Your Spotify client ID | |
SPOTIFY_CLIENT_SECRET |
Your Spotify client secret | |
SPOTIFY_REDIRECT_URI |
Your Spotify redirect uri | http://localhost:8000/callback |
METALSTATS_DATA_DIR |
Your data directory | data/ |
You can set these variables directly in your shell or via Docker as shown below.
git clone https://github.com/beucismis/metalstats
cd metalstats/
pip install .
uvicorn metalstats.main:app --reload
git clone https://github.com/beucismis/metalstats
cd metalstats/
docker build -t metalstats .
docker run -d \
-p 8000:8000 \
-e SPOTIFY_CLIENT_ID="spotify_client_id" \
-e SPOTIFY_CLIENT_SECRET="spotify_client_secret" \
-e SPOTIFY_REDIRECT_URI="spotify_redirect_uri" \
-v ~/data:/data \
--name metalstats \
metalstats
Once the service is running, you can access the API at http://localhost:8000.
- The ASGI app is defined as
appinsrc/metalstats/main.py. - When installed as a package, you can launch it using
uvicorn,hypercorn,fastapi-cli, or any compatible ASGI tool.
metalstats is distributed under the terms of the MIT license.