A FastAPI application that converts playlists between Spotify and YouTube.
- Convert Spotify playlists to YouTube playlists
- Convert YouTube playlists to Spotify playlists
- Caching system to reduce API calls
- Detailed logging and performance metrics
- Docker support for easy deployment
- Python 3.11 or higher
- Docker and Docker Compose (for containerized deployment)
- Spotify Developer Account
- YouTube API Credentials
- Firebase/Firestore Project
-
Copy the environment template:
cp .env.example .env -
Fill in your credentials in the
.envfile:- Spotify Client ID and Secret
- YouTube API Key
- Firestore Project ID
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt -
Run the application:
uvicorn main:app --reload
-
Build and start the containers:
docker-compose up --build -
The application will be available at
http://localhost:8000 -
To stop the containers:
docker-compose down
Once the application is running, you can access:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
spotify2youtube/
├── config/
│ ├── settings.py
│ └── firestore_config.py
├── core/
│ ├── spotify_client.py
│ └── youtube_client.py
├── database/
│ └── firestore_ops.py
├── routers/
│ └── playlist.py
├── utils/
│ ├── helpers.py
│ └── logger.py
├── main.py
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── .env.example
└── README.md
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.