Server side for my music streaming android application. It was built using Flask web framework.
This application provides REST API endpoints to handle working with users, basic and token authentication, managing playlists, searching database for music related content and streaming audio files.
It uses postgres as a database. All audio files themselves are stored in a file system.
Detailed information about songs, albums and links to album covers retrieved via last.fm API and stored in a database.
All http responses contain data in a JSON format.
Besides Flask as a base web framework, this application uses:
- Flask-HttpAuth to provide basic authentication capabilities
- Flask-SqlAlchemy as an ORM to communicate with postgres database
- Flask-Migrate to handle SQLAlchemy database migrations
- PyJWT as a way to introduce token authentication
- Requests to get data from last.fm API
- Mutagen to extract metadata from local audio files
- and Pytest for testing during development
- Provide private API endpoints as an admin panel
- Rework application files structure
- Provide a comfortable way to upload new audio files. So far it just uses python script to add files from a local folder.