CLI tool to export spotify playlists to flat files
Project description
XSPF generator
CLI to export your Spotify playlists to XSPF files for portable backups.
Prerequisites
- Python 3.12+
- uv for dependency management and virtualenvs
- A Spotify application (create one in https://developer.spotify.com/dashboard) to obtain a Client ID, Client Secret, and Redirect URL
Getting started
- Install uv if you do not already have it:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install dependencies into a uv-managed virtual environment:
uv sync - Run the exporter (uv will activate the env automatically):
uv run python -m xspfify.main -o output
- You will be prompted for your Spotify Client ID, Client Secret, and Redirect URL. The redirect URL must match one configured for your Spotify app (e.g.
http://127.0.0.1:8000/callback). - Playlists will be written as
.xspffiles into the folder provided by-o(defaults to./output).
- You will be prompted for your Spotify Client ID, Client Secret, and Redirect URL. The redirect URL must match one configured for your Spotify app (e.g.
Package for pipx
- Build distributable artifacts with uv:
uv buildThis createsdist/*.whlanddist/*.tar.gzthat pipx can consume. - Share one of the artifacts (or host it in an index such as PyPI).
- On another machine, install and run the CLI with pipx:
pipx install /path/to/dist/xspfify-0.1.0-py3-none-any.whl xspfify -o output
Replace the path with the actual wheel location or git/URL you published. Becausepyproject.tomldefines a console script entry point, pipx will expose thexspfifycommand automatically.
Development workflows
- Format / lint:
uv run ruff format . uv run ruff check .
- Add new dependencies:
uv add package-name uv add --group dev dev-package-name
- Update all locked dependencies:
uv lock --upgrade
Notes
The generated playlists include artist, album, and track title for broad compatibility. Extend the payload by updating the get_playlist_tracks pipeline in spotify_utils.py and playlist_from_spotify_items in xspf_utils.py.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xspfify-0.1.0.tar.gz.
File metadata
- Download URL: xspfify-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6c13f5c61176faa6585547256c7711205225173731bd12ce923223303a3214e
|
|
| MD5 |
6aae921ca831f65732e9813b38706755
|
|
| BLAKE2b-256 |
affedab553d28c80fc3139ef8485f3c9cd6a6deaba039646d8f04003de8ce36a
|
Provenance
The following attestation bundles were made for xspfify-0.1.0.tar.gz:
Publisher:
release.yml on aaronclong/xspfify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xspfify-0.1.0.tar.gz -
Subject digest:
e6c13f5c61176faa6585547256c7711205225173731bd12ce923223303a3214e - Sigstore transparency entry: 714581966
- Sigstore integration time:
-
Permalink:
aaronclong/xspfify@80350980495255ccf2ab006909ea5708d0ed0a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aaronclong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@80350980495255ccf2ab006909ea5708d0ed0a3b -
Trigger Event:
release
-
Statement type:
File details
Details for the file xspfify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xspfify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5304b1d49d9f2947fab6c77d41e1b1b70528522fd0672ee92709d2d0375437d8
|
|
| MD5 |
7c13bfe1a185ff3d16ca089c1c86e8a2
|
|
| BLAKE2b-256 |
82cc381fada589166bdaaeef09c250a501ffa9d497a7265ac0fd057c03446314
|
Provenance
The following attestation bundles were made for xspfify-0.1.0-py3-none-any.whl:
Publisher:
release.yml on aaronclong/xspfify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xspfify-0.1.0-py3-none-any.whl -
Subject digest:
5304b1d49d9f2947fab6c77d41e1b1b70528522fd0672ee92709d2d0375437d8 - Sigstore transparency entry: 714581976
- Sigstore integration time:
-
Permalink:
aaronclong/xspfify@80350980495255ccf2ab006909ea5708d0ed0a3b -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aaronclong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@80350980495255ccf2ab006909ea5708d0ed0a3b -
Trigger Event:
release
-
Statement type: