Skip to main content

Python library and CLI for Bandcamp data

Project description

bandcamp-explorer

A terminal browser and Python library for Bandcamp.

Search for artists and albums, discover releases by genre and location, browse artist/label profiles and discographies — all from the command line.

Install

Requires Python 3.12+.

uv tool install bandcamp-explorer
# or
pip install bandcamp-explorer

For local development:

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

CLI

Search

bandcamp "caladan brood"                  # search everything
bandcamp "erang" --artist                 # artists/labels only
bandcamp "echoes of battle" --album       # albums only
bandcamp "a forest whisper" --track       # tracks only

Browse by tag

bandcamp --tag dungeon-synth
bandcamp --tag black-metal --sort pop
bandcamp --tag dungeon-synth --location france
bandcamp --tag dungeon-synth --location paris

Sort modes: date (default), pop (popular).

Location tag IDs are discovered from Bandcamp at runtime and cached locally. Force a refresh with --refresh-location.

Direct URLs

bandcamp https://erang.bandcamp.com/album/tome-iv
bandcamp https://erang.bandcamp.com

Interactive navigation

After selecting a result, you enter an interactive browser:

  • Artists — view bio, browse discography, select an album to see its tracklist, select a track to view its page, navigate to the label.
  • Albums — header with tracklist, description, and lyrics; navigate to the artist/host page or select a track.

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

Output modes

bandcamp "erang" --artist --json   # output as JSON
bandcamp --tag dungeon-synth --json
bandcamp https://erang.bandcamp.com/album/tome-iv --json
bandcamp https://erang.bandcamp.com/album/tome-iv --full   # all sections at once
bandcamp -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 bandcamp_explorer.core import (
    BandcampClient, AlbumAPI, ArtistAPI, DiscoverAPI, SearchAPI,
    resolve_location,
)

with BandcampClient() as client:
    # Search
    results, has_more = SearchAPI(client).search("caladan brood", item_type="album")

    # Discover releases by tag
    discover = DiscoverAPI(client)
    releases, has_more = discover.discover(tags=["dungeon-synth"], sort="pop")
    all_releases = discover.discover_all(tags=["dungeon-synth"], max_pages=3)

    # Fetch album details
    album = AlbumAPI(client).get("https://erang.bandcamp.com/album/tome-iv")
    for track in album["tracks"]:
        print(f"  {track['position']}. {track['title']} ({track['duration']})")

    # Fetch artist/label profile
    artist = ArtistAPI(client).get("https://erang.bandcamp.com")
    for item in artist["discography"]:
        print(f"  {item['title']}")

    # Location filtering
    tag_id = resolve_location(client, "paris")
    releases, _ = discover.discover(tags=["dungeon-synth", tag_id])

    # Download images
    client.download_image(album.get("image_url"), output_dir="./images/")

License

MIT

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

bandcamp_explorer-0.3.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

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

bandcamp_explorer-0.3.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file bandcamp_explorer-0.3.0.tar.gz.

File metadata

  • Download URL: bandcamp_explorer-0.3.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bandcamp_explorer-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cead7e7fae73baf3bc17b999245770b0b8aa9a3cd4c9f2404f5cf94aa9f38e2b
MD5 d2589fe0c0db559b13bb71bffea248dd
BLAKE2b-256 acf87f32406ce7dcd3152248382d71f0709667b40eb47eefea463a82e086b61d

See more details on using hashes here.

File details

Details for the file bandcamp_explorer-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: bandcamp_explorer-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for bandcamp_explorer-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5547668012c6c0c1135dd5fa19869d350e962a4a0c6119af27352d3c479bd766
MD5 f14e648360530c5b3cdaf9b0adb539d4
BLAKE2b-256 1f1d92735b1f82f9f4426a6f119c7cbdd9e511892df956cb98fc4fe02395d82b

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