| Crates.io | bandcamp |
| lib.rs | bandcamp |
| version | 0.3.4 |
| created_at | 2025-10-12 14:32:48.68033+00 |
| updated_at | 2025-11-02 08:36:33.363904+00 |
| description | Bandcamp API wrapper |
| homepage | |
| repository | https://github.com/fabi321/bandcamp |
| max_upload_size | |
| id | 1879356 |
| size | 105,868 |
If you find any Artist/Album/Track that does not work, feel free to open an issue.
cargo add bandcamp
pip install bandcamp_lib
The Rust API and Python API are identical except for search results.
import bandcamp_lib
# From URL methods first need to search for the element in question, to get the id
artist = bandcamp_lib.artist_from_url("myrkur.bandcamp_lib.com")
for element in artist.discography:
print(element.title, element.item_type)
# fetch_* methods only do one api call, but require an artist and album/track id
album = bandcamp_lib.fetch_album(artist.id, artist.discography[0].id)
for track in album.tracks:
print(track.title)
search_results = bandcamp_lib.search("foo")
for result in search_results:
if isinstance(result, bandcamp_lib.SearchResultItemAlbum):
print("Got album", result.name)
use bandcamp::*;
fn main() {
let search_results = search("foo").unwrap();
for result in search_results {
if let SearchResultItem::Album(album) = result {
println!("Got album {}", album.name);
}
}
}