Skip to main content

SPOTIFY-HISTORY-READER

A simple tool to read Spotify's extended streaming history. You can follow this guide to get yours. Once you have the ZIP downloaded, you can start using this tool. You don't even need to unzip it.

json files contents

[
    ...,
    {
        "conn_country": "SI",
        "episode_name": null,
        "episode_show_name": null,
        "incognito_mode": false,
        "ip_addr_decrypted": "1.2.3.4",
        "master_metadata_album_album_name": "Humanz",
        "master_metadata_album_artist_name": "Gorillaz",
        "master_metadata_track_name": "Andromeda (feat. DRAM)",
        "ms_played": 8778,
        "offline": false,
        "offline_timestamp": 1572964071330,
        "platform": "OS X 10.15.1 [x86 8]",
        "reason_end": "endplay",
        "reason_start": "clickrow",
        "shuffle": true,
        "skipped": null,
        "spotify_episode_uri": null,
        "spotify_track_uri": "spotify:track:2C0KFbb4v9CNWR5c9jWcKC",
        "ts": "2019-11-05T14:28:00Z",
        "user_agent_decrypted": "unknown",
        "username": "username"
    },
    ...,
]

Usage

pip install -r samples/requirements.txt
python samples/top_artists_over_time.py

Data Structures

See the core class file for more details on what properties are available. Here are some key ones of interest:

Play

The main class. An iterable of Plays is returned by the SpotifyHistoryReader.read() method.

Members

  • artist: The artist (or show, if episode)
  • song: The song name (or episode name, if episode)
  • id: The unique identifier of the song or episode. This is a Spotify URI that can be used with other Spotify APIs to read more song metadata. Samples TBD.
  • is_song: Whether the Play is a song. If it's not a song, it's an episode.
  • timestamp: An alias for playback.timestamp, the date and time at which the song was played. I think this is always UTC, and I don't belive the user's timezone is included (though the country is).

Play.playback

Data for the playback of the track.

Members

  • ms_played: Duration in milliseconds the track was played.
  • reason_start (string)
  • reason_end (string)
  • shuffle (boolean)
  • skipped (boolean)

Play.connection

Data for the connection of the listener of the track.

Members

  • incognito_mode: (boolean) Whether the user was listening with incognito mode enabled.
  • offline: (boolean) Whether the user was offline while listening.
  • username (string)
  • platform (string)
  • ip (string)
  • country (string)

Metadata

Release files for spotify-history-reader 0.1.2

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

Source distribution (sdist)

Source distribution for spotify-history-reader 0.1.2
File Size Uploaded Provenance Actions
spotify_history_reader-0.1.2.tar.gz 3.8 kB Without provenance Details for spotify_history_reader-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spotify-history-reader 0.1.2
File Interpreter ABI Platform Actions
spotify_history_reader-0.1.2-py3-none-any.whl Python 3 none any Details for spotify_history_reader-0.1.2-py3-none-any.whl

Total release size: 8.6 kB

Release files / spotify_history_reader-0.1.2.tar.gz

Download URL spotify_history_reader-0.1.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
55da6ac5ea6f2475653903be22459455953f0fd53822cd9ea6c2cc3185d53dea
BLAKE2b-256 checksum
How to use checksums
c3795410099e046ec4e8054ba6cf8d958ba8661cdca9e1270690cb04db769a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.8 Linux/6.8.0-1017-azure

Release files / spotify_history_reader-0.1.2-py3-none-any.whl

Download URL spotify_history_reader-0.1.2-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74d2704c8f5c853e28d7582e98eefcd011d6c384c9ec1f4efd457d2ff037a0b1
BLAKE2b-256 checksum
How to use checksums
b7a230a6afb34773ed6737fee427dfa9efa934dba1d52f1ef16dbb52fedd9213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.8 Linux/6.8.0-1017-azure

Security for spotify-history-reader 0.1.2

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