Skip to main content

bandcamp-search

Library to search for music on Bandcamp.

Installation

pip install bandcamp-search

Usage

Sample usage is in bandcamp_search/__main__.py:

import sys
from typing import cast

from bandcamp_search.search import search
from bandcamp_search.models import (
    AlbumSearchResult,
    ArtistLabelSearchResult,
    SearchType,
    TrackSearchResult,
)

if __name__ == "__main__":
    query = sys.argv[1]
    results = search(query, SearchType.ALL)
    for result in results["auto"]["results"]:
        if result["type"] == SearchType.ALBUMS:
            result = cast(AlbumSearchResult, result)
            print(f"Album: {result['name']}")
            print(f"  by {result['band_name']}")
            print(f"  buy at {result['item_url_path']}")
        if result["type"] == SearchType.ARTISTS_AND_LABELS:
            result = cast(ArtistLabelSearchResult, result)
            print("Artist/Label: {result['name']}")
            print(f"  {result['location']}")
        if result["type"] == SearchType.TRACKS:
            result = cast(TrackSearchResult, result)
            print(f"Track: {result['name']}")
            print(f"  on {result['album_name']} by {result['band_name']}")
            print(f"  listen at {result['item_url_path']}")

Metadata

Release files for bandcamp-search 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 bandcamp-search 0.1.0
File Size Uploaded Provenance
bandcamp_search-0.1.0.tar.gz 2.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 6.4 kB

Release files / bandcamp_search-0.1.0.tar.gz

Download URL bandcamp_search-0.1.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
de289b9ec4170796b41d84a0104d2e31a783c880204ad82f5bc23c0142ce6148
BLAKE2b-256 checksum
How to use checksums
20e6c186e69acdb7eb72687d1d24c46d7c7bd15c2a3a4d4d62ac9398d98da937
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Linux/5.15.0-112-generic

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

Download URL bandcamp_search-0.1.0-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ef0acb80ca56bee76aaa25c48c342ae8a6cbf526b86c2c5cdc94c3561ef9e3a
BLAKE2b-256 checksum
How to use checksums
12de65c92c9871ddde1a200f19636388da4ba8f56643afeecf787372f0ac5d95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.13.0 Linux/5.15.0-112-generic

Security for bandcamp-search 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No 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