Skip to main content

pyspoti

An interactive terminal browser for Spotify.

Search artists, albums, and tracks — then navigate between them with a menu-driven UI. Album covers display inline on supported terminals.

Install

Requires Python 3.12+.

uv tool install pyspoti
# or
pip install pyspoti

For local development:

git clone https://github.com/gabriel-jung/pyspoti.git
cd pyspoti
uv sync

Requires a Spotify application with Client Credentials. Add the following to your ~/.zshrc or ~/.bashrc:

export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret"

Alternatively, place a .env file with the same variables in the directory where you run the command.

Usage

Search

spotify Summoning                        # search all categories
spotify --artist Summoning               # artists only
spotify --album "Minas Morgul"           # albums only
spotify --track "Long Lost to Where"     # tracks only

Filters

spotify --genre "black metal"            # search by genre
spotify --genre "black metal" --year 2024  # genre + year
spotify --album --label "Season of Mist"   # albums by label
spotify --new                            # albums from the last two weeks
spotify --new --hipster                  # recent low-popularity albums

Interactive navigation

After selecting a result, you enter an interactive browser:

  • Artists — view top tracks, browse discography, select an album to see its tracklist, select a track to see details and navigate to its artist or album.
  • Albums — header with tracklist, select a track or navigate to the artist.
  • Tracks — header with details, navigate to artist or album.

Press 0 to go back, Ctrl+C to quit.

Output modes

spotify --artist Summoning --json   # output as JSON
spotify --artist Summoning --full   # all sections at once, no interaction
spotify -v ...                      # enable debug logging

Terminal images

Album covers and artist images render inline on terminals that support the iTerm2 or Kitty image protocol (iTerm2, Kitty, WezTerm, Mintty).

Library

The core module has no terminal dependencies — use it in scripts, pipelines, or other tools. All data is returned as plain dicts with a _type discriminator key.

from pyspoti.core import SpotifyClient, ArtistAPI, AlbumAPI, TrackAPI, SearchAPI

with SpotifyClient(client_id, client_secret) as client:
    # search
    artists = ArtistAPI(client).search("Summoning")
    albums = AlbumAPI(client).search("Minas Morgul")
    tracks = TrackAPI(client).search("Long Lost to Where")

    # cross-type search
    results = SearchAPI(client).search("Summoning")
    # → {"artists": [...], "albums": [...], "tracks": [...]}

    # fetch full details
    artist = ArtistAPI(client).get(artists[0]["id"])
    top_tracks = ArtistAPI(client).get_top_tracks(artist["id"])
    discography = ArtistAPI(client).get_albums(artist["id"])

    album = AlbumAPI(client).get(discography[0]["id"])
    track = TrackAPI(client).get(top_tracks[0]["id"])

    # download images
    client.download_image(artist["image_url"], output_dir="./images/")

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyspoti-0.3.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

pyspoti-0.3.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pyspoti-0.3.1.tar.gz.

File metadata

  • Download URL: pyspoti-0.3.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyspoti-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b00d08d9aacf4681178ab2f0c9a34823fa81c496bca544238632d8662a0672e1
MD5 283b97fe9171028400d4db825bba6a8b
BLAKE2b-256 d9a1ba73f6b881dd15006a2fe98fbfcad4f06afdc92c1bb84a08034b4907989f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyspoti-0.3.1.tar.gz:

Publisher: publish.yml on gabriel-jung/pyspoti

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

File details

Details for the file pyspoti-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyspoti-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyspoti-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc3497e772df8b2118d94d5f1823105c86336440c56a84febecea7fda9cba72
MD5 29a7a97486597dfced11f2b931162a71
BLAKE2b-256 f4e2f39903bd8316d1e4d3ecb9f8e1319c9deaa31acf00f554c8c4e8fb59195c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyspoti-0.3.1-py3-none-any.whl:

Publisher: publish.yml on gabriel-jung/pyspoti

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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.0

2 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