Skip to main content

Save a snapshot of your day as a Spotify playlist.

Project description

music_snapshot

Package Version Supported Python Versions Codecov License Code style: black py.typed

Save a snapshot of your day as a Spotify playlist.

Demo

Installation

Since music_snapshot is a command line tool, the recommended installation method is via pipx:

$ pipx install music_snapshot

Of course, you can just install it directly from [PyPI] (ideally, inside a virtualenv):

$ python -m pip install music_snapshot

Quick start

Authentication

To use music_snapshot you need to authorize it with both Spotify and Last.fm.

To get Spotify client ID and secret, create an OAuth client in Spotify developer dashboard (with the "Redirect URI" set to http://localhost:6600/music_snapshot).

To get Last.fm API keys, you need create a new Last.fm API account.

After obtaining all of the above, you need to run music_snapshot authorize which will save your config data in ~/.music_snapshot and allow you to create new music snapshots with music_snapshot create subcommand.

Usage

The default subcommand is create, which helps you create a new music snapshot (Spotify playlist).

You can see all available subcommands and options by running music_snapshot --help:

$ music_snapshot --help          
                                                                                        
 Usage: music_snapshot [OPTIONS] COMMAND [ARGS]...                                      
                                                                                        
 Save a snapshot of your day as a Spotify playlist.                                     
 Have you ever just let Spotify algorithm do its thing, keep going long after your      
 queue has finished and ended in a place you'd like to go back to? I'm here to help you 
 do just that.                                                                          
                                                                                        
 A 'music snapshot' is a Spotify playlist that encapsulates a part of your music        
 playing history.                                                                       
                                                                                        
 Unfortunately, because of Spotify API limitations (no accessible history of played     
 songs) the song history comes from your Last.fm account.                               
                                                                                        
 To use the app, you need to first create a new Spotify OAuth app in its developer      
 dashboard and get Last.fm API keys by creating a new API account. You can then use     
 those values in the authorize subcommand, which will also save the underlying data on  
 your disk.                                                                             
                                                                                        
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --version      Show the version and exit.                                            │
│ --help         Show this message and exit.                                           │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────╮
│ authorize  Authorize music_snapshot with Spotify and Last.fm.                        │
│ create     Create a new music snapshot (Spotify playlist).                           │
╰──────────────────────────────────────────────────────────────────────────────────────╯

Authors

Developed and maintained by Paweł Adamczak.

Source code is available at GitHub.

If you'd like to contribute, please take a look at the contributing guide.

Released under Mozilla Public License 2.0.

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

music_snapshot-0.1.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

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

music_snapshot-0.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: music_snapshot-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for music_snapshot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d2afe70a887cd77ee93e0e51264c3820c600d90b8bbab3f4ec06c7649956125
MD5 0183a81595bbe17abf476110ec353727
BLAKE2b-256 26c94743aa9068bc54522e2d2dab926ec111532a01e38fadb8dce37ea08cbdda

See more details on using hashes here.

Provenance

The following attestation bundles were made for music_snapshot-0.1.0.tar.gz:

Publisher: release.yml on pawelad/music_snapshot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: music_snapshot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for music_snapshot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 05cf297965c70dc9fdb37bb97c4d01f1c19fd21f5978ad7626a14f64c5711dbb
MD5 e7dc7ff329aa1eb5b4c45576117c5d33
BLAKE2b-256 e346d6d7b1c036a9f2720275ebb2d4140df97f308188920956f7425f168a5d26

See more details on using hashes here.

Provenance

The following attestation bundles were made for music_snapshot-0.1.0-py3-none-any.whl:

Publisher: release.yml on pawelad/music_snapshot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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