The Music Player API is a comprehensive FastAPI application designed to manage a music library with capabilities for uploading and downloading tracks. It leverages Backblaze B2 for file storage and SQLite for metadata management.
- Upload audio files to Backblaze B2.
- Download audio files.
- List all uploaded files.
- FastAPI: A modern web framework for building APIs with Python.
- Backblaze B2: Cloud storage service for storing uploaded files.
- SQLAlchemy: ORM for managing SQLite database.
-
Clone the repository:
git clone https://github.com/your_username/music-player-api.git cd music-player-api
-
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Rename .env.example to .env and fill in your Backblaze B2 credentials.
- Running the API You can run the API using Uvicorn:
uvicorn app.main:app --reload
- Endpoints POST /upload/: Upload a file. GET /download/{file_name}: Download a file. GET /files/: List all uploaded files. License This project is licensed under the MIT License.
- Go to GitHub and create a new repository named
music-player-api
. - Clone it to your local machine.
- Create the folder structure and files as described above.
- Push the changes to GitHub.