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.
Metadata
Release files for xspfify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xspfify-0.1.0.tar.gz | 10.8 kB | With provenance | Details for xspfify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xspfify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xspfify-0.1.0-py3-none-any.whl |
Total release size: 20.6 kB
Release files / xspfify-0.1.0.tar.gz
| Download URL | xspfify-0.1.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6c13f5c61176faa6585547256c7711205225173731bd12ce923223303a3214e
|
|
BLAKE2b-256 checksum How to use checksums |
affedab553d28c80fc3139ef8485f3c9cd6a6deaba039646d8f04003de8ce36a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2025.
Transparency logRelease files / xspfify-0.1.0-py3-none-any.whl
| Download URL | xspfify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5304b1d49d9f2947fab6c77d41e1b1b70528522fd0672ee92709d2d0375437d8
|
|
BLAKE2b-256 checksum How to use checksums |
82cc381fada589166bdaaeef09c250a501ffa9d497a7265ac0fd057c03446314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2025.
Transparency logSecurity for xspfify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for xspfify-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.