A micro client for MusicBrainz, implements simple functions to retrieve information
Project description
MusicBrainzAPI
A series of scripts that enable retrieving information from MusicBrainz API: https://musicbrainz.org/doc/MusicBrainz_API
Usage
When calling the public functions you will usually get a Response
object. You can check the error
property to determine if the REST call was successful, error_text
will attempt to hold some more useful information regarding the error.
Once successful the response
property contains the expected data structure from MusicBrainz
import jsonpickle
from music_brainz_api_micro import MusicBrainzAPI as MB
mb = MB()
result = mb.get_artist_by_mbid(
"35f92c4a-69d0-4ed1-ab9e-05259db89d14"
)
if result.error is False:
artist_obj = jsonpickle.decode(result.reponse)
print(artist_obj["sort-name"])
# "At the Gates"
Functions
Get artist data using unique identifier
get_artist_by_mbid(mbid)
Get all releases by artist
get_releases_by_artist(mbid)
Get just a list of release titles
get_release_titles_by_artist(mbid)
Maintenance
Safely delete all cache files, default in $HOME/.cache/MusicBrainzAPI
Build
python -m build
python -m twine upload dist/*
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
Built Distribution
Hashes for music_brainz_api_micro-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad9989982d3bfc98909dac5c1498ff17a1896d7a6bf37177bab0c4724870594 |
|
MD5 | 4db26fa4cc9f4079afe96359f24601ca |
|
BLAKE2b-256 | 9e0c474db4a350c380b8eb3ea0793c0d41d82ebe20d6329a677d4e9abddf1ccd |
Hashes for music_brainz_api_micro-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b462c59418d5c5db9491f3edc32ef2a4125b74c568b36b6b9c6d1acdc4130558 |
|
MD5 | f0226523a5689a9a3687de832b904184 |
|
BLAKE2b-256 | 440551965a51cb3fafdb1ed47350649df6551b69234b14159cda7a8e0fc15625 |