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

pip install bandcamp-explorer
# or
uv tool 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

Navigation

  • Enter a number to select an item from any list
  • n / p — next / previous page
  • a — navigate to artist page (from album)
  • h — navigate to host/label page (when different from artist)
  • 0 — go back
  • Ctrl+C — quit

JSON output

bandcamp "erang" --artist --json
bandcamp --tag dungeon-synth --json
bandcamp https://erang.bandcamp.com/album/tome-iv --json

Library

from bandcamp_explorer.core import BandcampClient, AlbumAPI, ArtistAPI, DiscoverAPI, SearchAPI

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
    from bandcamp_explorer.core import resolve_location
    tag_id = resolve_location(client, "paris")
    releases, _ = discover.discover(tags=["dungeon-synth", tag_id])

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

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.2.0.tar.gz (19.5 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.2.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bandcamp_explorer-0.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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.2.0.tar.gz
Algorithm Hash digest
SHA256 6a1d6104fb91bf50ab220be8f504a30f0c89e94be87f3b2bc13ff7d905cff4eb
MD5 424cb67356712efc6543760ca8770198
BLAKE2b-256 1d430182ec5c50956a3fd84f4b29fa3861a2ecdd5c5b2c8f4f5c517ac52f5712

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bandcamp_explorer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 983d0e2bca7fce0fd986cbe1752079de45b202edf4b770ddabe5aa6b07c1f505
MD5 5d4b95e3ad306838c7dfae66220d0454
BLAKE2b-256 02b811ea5198132b4164924502c30d8eef364b5ac0421a97b11273bc05cb0319

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