https://github.com/falkern/spotifav
A python based cli tool that fetches tracks from a specified spotify playlist and provides song recommendations based on those tracks.
https://github.com/falkern/spotifav
cli music open-source python recommendation-system script spotify spotify-api tools useful
Last synced: 10 months ago
JSON representation
A python based cli tool that fetches tracks from a specified spotify playlist and provides song recommendations based on those tracks.
- Host: GitHub
- URL: https://github.com/falkern/spotifav
- Owner: Falkern
- Created: 2024-10-20T15:50:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-20T15:55:40.000Z (about 1 year ago)
- Last Synced: 2025-01-24T13:16:05.641Z (12 months ago)
- Topics: cli, music, open-source, python, recommendation-system, script, spotify, spotify-api, tools, useful
- Language: Python
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playlist Recommendation Tool
This project is a Python-based tool that fetches tracks from a specified Spotify playlist and provides song recommendations based on those tracks. It utilizes the Spotify Web API through the `spotipy` library.
## Features
- Fetch tracks from a given Spotify playlist.
- Generate song recommendations based on the fetched tracks.
- Display recommended songs with their names and artists.
## Requirements
- Python 3.6 or higher
- `spotipy` library
- `python-dotenv` library
## Setup
1. Clone the repository:
```sh
git clone https://github.com/Falkern/spotifav.git
cd spotifav
```
2. Install the required libraries:
```sh
pip install spotipy python-dotenv
```
3. Create a `.env` file in the root directory and add your Spotify API credentials:
```env
SPOTIPY_CLIENT_ID='your_client_id'
SPOTIPY_CLIENT_SECRET='your_client_secret'
SPOTIPY_REDIRECT_URI='http://localhost:8080/callback'
```
## Usage
1. Run the script with the Spotify playlist ID:
```sh
python playlist.py --limit
```
Example:
```sh
python playlist.py 37i9dQZF1DXcBWIGoYBM5M --limit 10
```
2. The script will fetch tracks from the specified playlist and print out song recommendations.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request for any changes.
## Acknowledgements
- [Spotipy](https://spotipy.readthedocs.io/) - A lightweight Python library for the Spotify Web API.
- [Spotify for Developers](https://developer.spotify.com/) - Official Spotify Web API documentation.