Skip to main content

GraphMyTunes

License Python 3.13


Overview

GraphMyTunes builds insightful visualizations using the metadata in your Apple Music (formerly known as iTunes) library. Its goal is to provide data to help you better understand your music listening and curation habits.

Requirements

  • Apple Music app for Mac
  • Python (tested primarily with 3.13, but probably works fine with 3.9 and higher)

Quick Start

Follow these 3 steps to get started analyzing your music library.

Step 1: Install Python and GraphMyTunes

  1. Download and install Python.

  2. Use pip to install GraphMyTunes:

     pip install GraphMyTunes
    

Step 2: Export your music library to XML

  1. In the Apple Music app for Mac, choose File > Library > Export Library.

  2. Save the XML file to a convenient location.

Step 3: Run GraphMyTunes

  1. Provide the path to the XML you just saved to GraphMyTunes for analysis.

     graphmytunes ~/Music/2025-07-05.xml --output ~/Music/GraphMyTunesOutput
    
  2. When processing is complete, view your graphs in the folder you specified in --output.

GraphMyTunes includes 50+ built-in ways to analyze your music collection, including but not limited to:

Top albums by total play time
Top albums by total play time

Top artists by play count
Top artists by play count

Top decades by play count
Top decades by play count

Top genres by total play time
Top genres by total play time

Plays by hour of day
Plays by hour of day

Plays by day of week
Plays by day of week

Limitations and Scope

  • At this time, GraphMyTunes development is focused around Apple Music only. There are likely other solutions that serve those with Spotify, Amazon, Pandora, or Last.fm libraries.

  • GraphMyTunes is limited by the metadata exported by the Music app. Specifically, the exported XML does not include every date/time you played a track; it only includes the most recent play date/time. Therefore, GraphMyTunes will not be able to surface some listening trends (for example, finding songs you used to listen to a lot but now listen to infrequently).

  • GraphMyTunes does not include single-metric metadata rankings that can easily be done in the Music app itself (for example, listing the top tracks by play count). If you want these, go to the Music app's "Songs" view, adjust the view options to include the desired columns, and sort ascending or descending by that column. GraphMyTunes aims to provide ways to aggregate or group data in ways that the Music app cannot do.

  • Although GraphMyTunes should run on Windows, there is no option to export the library as an XML file in the Windows version of Apple Music.

Support

Found a bug or have a suggestion? First check to see if somebody has already opened a similar issue on GitHub. If not, feel free to open one.

Contributing

Contributions are welcome! You may submit pull requests on GitHub. Please include a detailed description of the change being implemented, and consider including unit tests for any new features. See CONTRIBUTING.md for details.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.

Metadata

Release files for GraphMyTunes 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GraphMyTunes 1.1.0
File Size Uploaded Provenance Actions
graphmytunes-1.1.0.tar.gz 41.2 kB Without provenance Details for graphmytunes-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GraphMyTunes 1.1.0
File Interpreter ABI Platform Actions
graphmytunes-1.1.0-py3-none-any.whl Python 3 none any Details for graphmytunes-1.1.0-py3-none-any.whl

Total release size: 128.9 kB

Release files / graphmytunes-1.1.0.tar.gz

Download URL graphmytunes-1.1.0.tar.gz
Size 41.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8df08b6b1188ca432394436521a7af5378652cc2f34146ad6e800aace63810e0
BLAKE2b-256 checksum
How to use checksums
5556539589b2f8b9ea1c5f6a68f2f92a89bfadfae3b3a875f831715b489e7774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / graphmytunes-1.1.0-py3-none-any.whl

Download URL graphmytunes-1.1.0-py3-none-any.whl
Size 87.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
372e1cc31b62c63492998f2dea9f727b30bea90d3c9ac9985fb9d481fd2ce44b
BLAKE2b-256 checksum
How to use checksums
a96e66037141cdbb727ace381ba27f0c17f0076c5ee45ea01ec9189666163f92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for GraphMyTunes 1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page