Skip to main content

setlistash

setlistash is a cross-platform Python CLI tool that creates complete, non-destructive local backups of every attended concert saved in a Setlist.fm profile.

Each backup run produces a fresh timestamped folder containing an Excel-compatible events.csv index, one formatted Markdown file with YAML frontmatter per concert, and an optional raw JSON archive.

Features

  • Full pagination & API compliance: Fetches every attended concert from Setlist.fm REST API v1.0 with built-in rate limiting (0.6s minimum spacing) and exponential backoff retry on HTTP 429.
  • Zero overwrites: Every run writes to a new timestamped directory (setlistash_backup_<user>_<YYYY-MM-DD_HH-MM-SS>) with automatic progressive suffixes on collisions.
  • Portable & system config: Stores credentials securely in your OS configuration directory via platformdirs, or locally in ./config.json for portable workflows.
  • Cross-platform filenames: Sanitizes Windows, macOS, and Linux reserved characters, enforces a 120-character filename cap, and deduplicates same-day collisions using setlist_id.
  • Rich Markdown + CSV output: Exports utf-8-sig CSV ordered newest-to-oldest alongside Markdown setlists supporting multiple sets, encores, covers, guest artists, tape tracks, and song notes.

Requirements

  • Python 3.10 or newer
  • A free Setlist.fm API key

Obtaining a Setlist.fm API Key

  1. Sign in to your Setlist.fm account.
  2. Open the API key settings page: https://www.setlist.fm/settings/api.
  3. Request a non-commercial API key for personal backup use.
  4. Copy the generated key and save it with setlistash config (never commit your key to version control).

Installation

From PyPI:

pipx install setlistash

From a local clone:

pipx install .

Using pip

pip install setlistash

For local development with tests:

pip install -e ".[dev]"
pytest

CLI Commands and Aliases

Installing the package exposes three equivalent executables:

  • setlistash (primary command)
  • slstash (short alias)
  • slfm-stash (short alias)

Global Flags

Short Long Description
-v --version Show installed setlistash version and exit.
-h --help Show command help and exit.

1. Configure Credentials (config / cfg)

setlistash config
# or
slstash cfg --local

Prompts securely for your API key (hidden input) and an optional default Setlist.fm username.

Short Long Description
-L --local Save config.json in the current working directory instead of the OS config folder.

API Key Resolution Order

  1. CLI flag -k / --api-key
  2. Environment variable SETLISTFM_API_KEY
  3. Local ./config.json in the current working directory
  4. System config.json in the platformdirs user config directory
  5. Controlled exit with setup instructions

2. Run a Backup (run / backup / r)

setlistash run YOUR_USERNAME
# or using the configured default user and short aliases
slstash r -o ./backups -r
Short Long Default Description
-o --output-dir . Parent directory for the timestamped backup folder.
-k --api-key None Override the Setlist.fm API key for this run.
-l --lang en Value for the Accept-Language request header.
-r --include-raw-json False Save the raw API response payload to raw_setlists.json.

Backup Output Structure

Each execution creates a new folder:

setlistash_backup_<username>_<YYYY-MM-DD_HH-MM-SS>/
├── events.csv
├── raw_setlists.json          # Included only when -r / --include-raw-json is passed
└── setlists/
    ├── 2024-08-23_Artist-Name_Venue-Name.md
    └── 2024-08-23_Artist-Name_Venue-Name_63de4613.md

events.csv

  • Encoded in utf-8-sig for seamless opening in Microsoft Excel and Unix tools.
  • Sorted chronologically from newest to oldest (YYYY-MM-DD).
  • Columns: event_date, artist, tour, venue, city, state, country, song_count, setlist_id, setlist_url, markdown_file.

setlists/*.md

Each concert file contains valid YAML frontmatter, an H1 heading, event metadata, and structured setlist sections (### Main Set, custom set names, ### Encore, ### Encore 2, etc.):

---
title: "Artist Name - Venue Name (2024-08-23)"
artist: "Artist Name"
date: "2024-08-23"
venue: "Venue Name"
city: "Rome"
country: "Italy"
tour: "World Tour 2024"
setlist_id: "63de4613"
url: "[https://www.setlist.fm/setlist/](https://www.setlist.fm/setlist/)..."
---

# Artist Name - Venue Name (2024-08-23)

- **Date:** 2024-08-23
- **Artist:** Artist Name
- **Tour:** World Tour 2024
- **Venue:** Venue Name
- **Location:** Rome, Lazio, Italy
- **Setlist.fm:** [https://www.setlist.fm/setlist/](https://www.setlist.fm/setlist/)...
- **Event Info:** Festival headline show

## Setlist

### Acoustic Set

1. Song Title (cover of Original Artist) (with Guest Artist) (live debut)

### Encore

1. Encore Song

If an event has no recorded tracks on Setlist.fm, the file explicitly states *No setlist recorded on setlist.fm.*.

License

Released under the MIT License.

Metadata

Release files for setlistash 0.1.0

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

Source distribution (sdist)

Source distribution for setlistash 0.1.0
File Size Uploaded Provenance Actions
setlistash-0.1.0.tar.gz 19.1 kB With provenance Details for setlistash-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for setlistash 0.1.0
File Interpreter ABI Platform Actions
setlistash-0.1.0-py3-none-any.whl Python 3 none any Details for setlistash-0.1.0-py3-none-any.whl

Total release size: 35.7 kB

Release files / setlistash-0.1.0.tar.gz

Download URL setlistash-0.1.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cc27f69ce26692e777a67cb0950c106ff56231d3d0479361b821c8fca062e384
BLAKE2b-256 checksum
How to use checksums
8ae18ac1535f244de893d2a857a1a1e57a735212b094cf45f30515a5fb132ffb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / setlistash-0.1.0-py3-none-any.whl

Download URL setlistash-0.1.0-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
445b681fa7137dec79d7d0438f99ac5193e23baf7cc5793ec2da1535a1e79a19
BLAKE2b-256 checksum
How to use checksums
67d886fe2922150d682ed48773bd2cde4c9d6562ad26e8ca69c3d8154a6760ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for setlistash 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for setlistash-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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