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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4d7a909ec7d5e9437de4e0dc08880407948a1e9bddb3fa94f02e125989f0864 |
|
MD5 | a936e6c272f190c6f77cd35fe2515dcd |
|
BLAKE2b-256 | 7d9a56fb145715473925e0233199132f916e696ce33f60c071c8a451bf36485a |
Hashes for music_brainz_api_micro-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5cfd4da220da2c15b43ce226b4002b2d329bb1fad0dd06e82ddc1d4440a44e8 |
|
MD5 | 178fb7c8e65f69e0a48e0601f9b10b58 |
|
BLAKE2b-256 | 3bdf1c44add1eb4413b8f6bc8ad940db2d10dcf50eaac6cf29cfd5b9d2b825e5 |