A Python-based application that demonstrates Spotify API integration using the Spotipy library. This project allows users to generate and manage Spotify playlists programmatically.
- 🎵 Generate custom Spotify playlists
- 🔌 Spotify API integration using Spotipy
- 🐍 Clean Python implementation
- 📊 Demonstrates RESTful API calling patterns
- Python - Core programming language
- Spotipy - Spotify Web API wrapper for Python
- Spotify API - Music data and playlist management
Before running this project, ensure you have:
- Python 3.7 or higher installed
- A Spotify account
- Spotify API credentials (Client ID and Client Secret)
- Clone the repository:
git clone https://github.com/yourusername/spotify-playlist-generator.git
cd spotify-playlist-generator- Install required dependencies:
pip install spotipy-
Set up your Spotify API credentials:
- Go to Spotify Developer Dashboard
- Create a new app
- Copy your Client ID and Client Secret
- Set up your redirect URI
-
Create a
.envfile or configure your credentials:
SPOTIPY_CLIENT_ID='your-client-id'
SPOTIPY_CLIENT_SECRET='your-client-secret'
SPOTIPY_REDIRECT_URI='your-redirect-uri'
Run the application:
python main.pyFollow the prompts to authenticate with Spotify and generate your playlist.
spotify-playlist-generator/
├── main.py # Main application file
├── requirements.txt # Project dependencies
├── .env # Environment variables (not tracked)
└── README.md # Project documentation
This project uses the Spotify Web API through the Spotipy library. Key endpoints used include:
- User authentication
- Playlist creation
- Track search and addition
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
For questions or feedback, please open an issue on GitHub.
⭐ If you found this project helpful, please consider giving it a star!