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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | defde80c576d95923461a57abb93eef948e4dc3a7fd813a2107fdc8ae32490d4 |
|
MD5 | 4dd1a5c6bdda31f8603296efce1adc93 |
|
BLAKE2b-256 | 80a32c17d7be951a3c2f9c79933daab75efac841139eb0e20c7adbb05ed9b6c1 |
Hashes for music_brainz_api_micro-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3acf726191f9e9171c1368837e27fbf41a55333f3e369da1c21a3d22f59fafef |
|
MD5 | 3c0ceb8289b21e9d9d3377ca407929fe |
|
BLAKE2b-256 | 0e5b13ccd16b922b5102c6e5488d760341f61646449116adc2851ef3b95d9a82 |