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.1.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.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotify_history_reader-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 75fc033da9516ae0048ebf3d3e378571daeb94f3e1d0999da5933fe5276a5035
MD5 b3b15bb19e4062f75af86d3cbf2f0eea
BLAKE2b-256 b62cb8fbc8d0bb1ba783f17c00a67ed0a7e42fb8050d7b530070339d3dcb831c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spotify_history_reader-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4246a5cc844e97e27f128c3f7bfacd20a6b6e9718fe0071678e711ef63cc7295
MD5 4f69c72c676a26624de8a11f489687b4
BLAKE2b-256 d60f0dbb14bbb75c1929d4fe2ca21fd89cf05a8dfb4fa41be0a10b823a3a005f

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