Spotify to Musi

raw JSON →
2.0.1 verified Sat May 09 auth: no python

Transfer Spotify playlists to Musi. Current version: 2.0.1. Async rewrite with improved Spotify to YouTube Music conversion. Release cadence is sporadic.

pip install spotify-to-musi
error No module named 'spotify_to_musi'
cause Incorrect installation or import name. Package is 'spotify-to-musi' (hyphen), but import uses underscore.
fix
Install: pip install spotify-to-musi. Then import using underscore: from spotify_to_musi import ...
error AttributeError: module 'spotify_to_musi' has no attribute 'SpotifyClient'
cause Older version (v1) used different class name or path.
fix
Upgrade to latest: pip install --upgrade spotify-to-musi. Then use: from spotify_to_musi import SpotifyClient
breaking v2.0.0 rewrites entire codebase to async. Synchronous usage no longer possible.
fix Use async context. See updated README for new usage.
deprecated pydantic v1 compatibility removed in 2.0.1.
fix Upgrade to 2.0.1 or later. Code using pydantic v1 schemas may break.
gotcha Twelve (12) tracks per batch limit from YouTube Music; transfers are not instantaneous.
fix Script will handle batching automatically, but large playlists may take time.

Initialize SpotifyClient and transfer a playlist.

import os
from spotify_to_musi import SpotifyClient

client = SpotifyClient(
    spotify_client_id=os.environ.get('SPOTIFY_CLIENT_ID', ''),
    spotify_client_secret=os.environ.get('SPOTIFY_CLIENT_SECRET', ''),
    spotify_redirect_uri='http://localhost:8888/callback'
)
# Transfer playlist by URL
client.transfer_playlist('https://open.spotify.com/playlist/...')