Convert spotify playlists to apple music
Project description
Spotify to Apple Music Converter
This web app allows you to easily perform cross-platform playlist migration from spotify to apple-music and vice-versa.
Overview
This program provides a convenient way to transfer all of your playlists from Spotify to Apple Music. The initial version supports the --all
mode to transfer all playlists at once. Before running the program, you need to configure the necessary API keys and tokens in the config.py
file located in the src
folder.
Apple Music API Configuration
To make requests to the Apple Music API, you need several keys, which can be obtained by enrolling in the Apple Developer Program. Once enrolled, you can access your team_id
, secret_key
, and key_id
directly. However, generating a music_user_token
requires extra steps since the Apple user authorization service is not available in Python. We recommend following the instructions in this GitHub repository to generate your music_user_token
. Once you have all of the required information, first replace the apple_private_key.p8 file with your private_key.p8
file that you downloaded from Apple. then create a .env
file in the src
folder and set these variables to their corresponding values.
# Apple API configuration
APPLE_KEY_ID=""
APPLE_TEAM_ID=""
APPLE_USER_TOKEN=""
Spotify API Configuration
Obtaining the Spotify API keys is more straightforward. After logging in to the Spotify Web API Dashboard with your Spotify account, you will have access to the required keys. Add them to the corresponding variables in the .env file you just created.
# Spotify API configuration
CLIENT_ID=""
CLIENT_SECRET=""
CALLBACK_ADDRESS=""
The program uses the Spotipy API to retrieve your current Spotify playlists and iterates through each track to find an iTunes identifier using the track's ISRC (a unique identifier for any published soundtrack). For matched songs, the program sends HTTP POST requests to copy each playlist to Apple Music. To comply with Apple's rate limit on API requests, there is a 3-second interval between each insertion.
Run tests on the program using make test.
Once up and running the program should update you on the progress of conversion as shown below. And pres cmd and click on the link to go to the playlist.
Usage
make
: list available commandsmake develop
: install and build this library and its dependencies usingpip
make build
: build the library usingsetuptools
make lint
: perform static analysis of this library withflake8
andblack
make format
: autoformat this library usingblack
make test
: run automated tests withpytest
make coverage
: run automated tests withpytest
and collect coverage informationmake dist
: package library for distribution
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for spotify-to-apple-py-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d271dcc6d35ba7bee32bd9c7b2bc8c85ae8b80789cb966dd950d5fce5bdd3af |
|
MD5 | ae5af531003365ab1d7f166052f6a8dd |
|
BLAKE2b-256 | 59063e6a6434a94be696fa1a2f65b0d6bff02041070f7aca20636f9785398dfe |