Skip to content

This Python API retrieves Billboard chart songs from any specified date and autonomously creates playlists within your Spotify profile.

License

Notifications You must be signed in to change notification settings

smellycloud/chart_to_playlist_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mockup_ln6slhru Disclaimer: Please ensure compliance with Spotify's terms of service and API usage policies when using this tool.

Supported charts: Billboard Hot 100, Billboard Tiktok, Billboard Streaming, Billboard 200 Global, Billboard Hits Of The World.

Guide

Follow these steps to set up and run the project on your local machine:

(I'm too cheap to deploy and host :3)

  1. Clone the Repository
  2. Install Requirements Navigate to the project directory and install the required packages by running: pip install -r requirements.txt
  3. Spotify Developer Credentials
    • Go to Spotify Developer Dashboard and log in or create an account.
    • Create a Spotify Developer App and note down the Client ID and Client Secret.
    • Set the Redirect URI for your app to http://localhost:8080.
    • In the User Management section, add your name and the email of your Spotify account.
  4. Environment Variables Create a .env file in the project directory and enter your Spotify Developer App credentials: CLIENT_ID=your_client_id_here, CLIENT_SECRET=your_client_secret_here
  5. Run the Server Start the server using uvicorn. Run the following command from the project directory: uvicorn main:app --reload
  6. Generate Playlists
    • Open your web browser and check the page_urls section in main.py to identify compatible charts. For example, to create a playlist called "Netherlands Songs 2023-01-21," visit: http://127.0.0.1:8000/billboard_world/netherlands_songs/2023-01-21.
    • To create a playlist called "Billboard 200 Global 2023-01-21" with the global top 200 songs, visit: http://127.0.0.1:8000/billboard200_global/2023-01-21
SCR-20231001-dadv
  1. Profit

Note: Some useful playlist information from Spotify is stored in .csv files, which can be found in the /data directory. These can be used for further analysis if necessary. SCR-20231001-djax

Todo:

  1. Write custom exceptions
  2. Unify Billboard and BillboardWorld
  3. Maybe build a companion mobile/desktop application
  4. Integrate charts by genre
  5. Build a recommender system? Hmm.

About

This Python API retrieves Billboard chart songs from any specified date and autonomously creates playlists within your Spotify profile.

Topics

Resources

License

Stars

Watchers

Forks

Languages