Fully-documented REST API for extracting, transforming, and storing playlists, artists, songs, and related metadata.
API for managing music playlists and related assets.
To make use of the Spotify endpoints (and related classes & methods) you need to supply your own SPOTIFY_CLIENT_ID
and SPOTIFY_SECRET
.
You can obtain them here if you're not already registered as a Spotify developer: https://developer.spotify.com/
- API endpoints to manage Artists, Songs, and Playlists, including POST, GET, PUT, PATCH, DELETE methods
- API endpoints for managing Users, including password encryption (bcrypt) and OAuth (JWTs)
- API endpoints for retrieving Artist and Song data from Spotify (requires Spotify API credentials)
- one API endpoint in particular deserves its own bullet ->
/spotify/artist/all
returns a giant dictionary containing all song features for all songs of a specified artist
- Python, YAML, and a couple of shell scripts
- FastAPI, Pydantic, Tortoise-ORM, and Postgres
- Docker, GitHub Actions, and Heroku
- Pytest fixtures and tests
- Black code formatting
- The included
env.sample
shows the environment variables you need to set
docker-compose up -d --build
docker-compose exec web python app/db.py
docker-compose exec web python -m pytest
docker-compose exec web black .
docker-compose exec web-db psql -U postgres
cd project && uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
cd project && celery -A app.music.tasks worker --concurrency=1 --loglevel=INFO