Skip to main content

lastfm-backup-cli PyPI - Python Version CI

Super-simple CLI tool for backing up Last.fm scrobbling data into CSV file

installation

  • pre-requisites: Python 3.7 or newer, pip
  • installation: pip install --user lastfm-backup-cli
    • or, if your default Python is 2.x: python3 -m pip install --user lastfm-backup-cli

usage

  • get your LastFM API key here
  • run: lastfm-backup <PATH TO BACKUP CSV FILE> --user <YOUR LASTFM USERNAME> --api-key <YOUR API KEY> --time-from <DATE OF FIRST SCROBBLE IN BACKUP FILE> --time-to <DATE OF LAST SCROBBLE IN BACKUP FILE>
    • example: lastfm-backup lastfm-backup-2021-01.csv --user Rezult --api-key <YOUR API KEY> --time-from 2021-01-01 --time-to 2021-02-01
  • you can also set env variables: LASTFM_API_KEY and LASTFM_USER

output

  • output CSV file structure is:
<SCROBBLE DATE>,<SCROBBLE TIME (UTC)>,<ARTIST>,<TITLE>
...
  • output CSV example:
2021-05-26,06:05:49,Alice Coltrane,Journey in Satchidananda
2021-05-25,14:16:08,London Music Works,"S.T.A.Y. (From ""Interstellar"")"
2021-05-25,13:18:39,Pantha du Prince,Silentium Larix
2021-05-25,13:11:10,Avenade,Have It Your Way
2021-05-25,13:03:51,Four Tet,Planet
2021-05-25,12:57:58,Songs: Ohia,Steve Albini's Blues
2021-05-25,12:52:31,Andy Stott,It Should Be Us

options

usage: lastfm-backup [-h] [--user USER] [--api-key API_KEY] [--time-from TIME_FROM] [--time-to TIME_TO] [-d] file

Super-simple CLI tool for backing up Last.fm scrobbling data

positional arguments:
  file                  CSV file path where backup should be written to. Defaults to lastfm.csv

optional arguments:
  -h, --help            show this help message and exit
  --user USER           The last.fm username to fetch the recent tracks of.Might be provided by env variable LASTFM_USER
  --api_key API_KEY     A Last.fm API key. Might be provided by env variable LASTFM_API_KEY
  --time-from TIME_FROM
                        Beginning timestamp of a range - only display scrobbles after this time. Must be in UTC. Example: 2021-05-13
  --time-to TIME_TO     End timestamp of a range - only display scrobbles before this time. Must be in UTC. Example: 2021-05-15
  -d, --debug           Enable more verbose logging

Metadata

Release files for lastfm-backup-cli 0.2.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 lastfm-backup-cli 0.2.2
File Size Uploaded
lastfm-backup-cli-0.2.2.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lastfm-backup-cli 0.2.2
File Interpreter ABI Platform
lastfm_backup_cli-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / lastfm-backup-cli-0.2.2.tar.gz

Download URL lastfm-backup-cli-0.2.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4b51522180a657cc2fc18d5783f336bc15598519e0ec637c69d573cbcd7d76ae
BLAKE2b-256 checksum
How to use checksums
ee6e99bc85a5b7bcd4bd4e5603ee3a22b84f7fc8287868fe9da9f689db397db8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.5 Linux/5.8.0-1033-azure

Release files / lastfm_backup_cli-0.2.2-py3-none-any.whl

Download URL lastfm_backup_cli-0.2.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8ccefd39f4fdc425e5ca2844521c6c568d7c47603823be584856cf6079e4fa2
BLAKE2b-256 checksum
How to use checksums
69ec0fd7eb3f27aed3229547d5225529bebf8fcbe11695039a46dfed36da383e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.5 Linux/5.8.0-1033-azure

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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