Skip to main content

Export Apple Music / iTunes playlists to CSV, XML, or JSON — no manual steps

Project description

itunes-export

Export Apple Music / iTunes playlists to CSV, XML, or JSON from the command line — no manual dragging, no XML library hacks. Uses the iTunes COM interface directly.

pip install itunes-export

Requires Windows with Apple Music or iTunes installed.

Usage

itunes-export --list
itunes-export --playlist "My Favorites"
itunes-export --playlist "Road Trip" --format xml
itunes-export --playlist "Road Trip" --format json
itunes-export --playlist "Road Trip" --output road_trip.csv

Exported fields

Name, Artist, Album, Album Artist, Composer, Genre, Year, Track Number, Track Count, Disc Number, Disc Count, Duration, Bit Rate, Sample Rate, Rating, Play Count, Date Added, Location, BPM, Comment, Kind

Formats

  • CSV (default) — UTF-8 with BOM for Excel compatibility
  • XML — structured <Playlist><Track> document
  • JSON{ playlist, exported, count, tracks: [...] }

Python API

from itunes_export import connect, get_user_playlists, find_playlist, export_csv

app = connect()
playlists = get_user_playlists(app)
matches = find_playlist(playlists, "Road Trip")
name, pl = matches[0]

rows = [track_row(pl.Tracks.Item(i)) for i in range(1, pl.Tracks.Count + 1)]
export_csv(rows, "road_trip.csv")

Requirements

  • Windows
  • Apple Music or iTunes installed
  • Python 3.8+

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itunes_export-0.1.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

itunes_export-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file itunes_export-0.1.0.tar.gz.

File metadata

  • Download URL: itunes_export-0.1.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for itunes_export-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8cd8c32c36b018f03901d385c2b03c9f6abc838991c76ca60e51317201ca11c
MD5 8f223db6c72f76ddc9694caf1a48e601
BLAKE2b-256 d70cc8b696d7882b56136be9cc04fc5f3d59a0ec0ba4a3a1a939f4afb41776ce

See more details on using hashes here.

File details

Details for the file itunes_export-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: itunes_export-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for itunes_export-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7092ebe50fefb64bceccd63665fc8b64eec911bcf940be4031c3d1f3a8ce8b6b
MD5 08cd5cc193bcc70523a839d5f24ececb
BLAKE2b-256 0cdbc0841ced971bd555e045f717cb253d7e73dcdddd1ed16a3feb5f409ab91c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page