Skip to main content

No project description provided

Project description

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)

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

spotify_history_reader-0.1.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

spotify_history_reader-0.1.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file spotify_history_reader-0.1.2.tar.gz.

File metadata

  • Download URL: spotify_history_reader-0.1.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.8 Linux/6.8.0-1017-azure

File hashes

Hashes for spotify_history_reader-0.1.2.tar.gz
Algorithm Hash digest
SHA256 55da6ac5ea6f2475653903be22459455953f0fd53822cd9ea6c2cc3185d53dea
MD5 f56ecebdfb1e9a2bc4c89c6d9589f19c
BLAKE2b-256 c3795410099e046ec4e8054ba6cf8d958ba8661cdca9e1270690cb04db769a6b

See more details on using hashes here.

File details

Details for the file spotify_history_reader-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for spotify_history_reader-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 74d2704c8f5c853e28d7582e98eefcd011d6c384c9ec1f4efd457d2ff037a0b1
MD5 37eec01ed5216576cf7193646e163b3b
BLAKE2b-256 b7a230a6afb34773ed6737fee427dfa9efa934dba1d52f1ef16dbb52fedd9213

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