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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf3db5ddc9266e8e2a8f8b8f444d1f474afe0e4fbb679778aab2a27ac2f2712d |
|
MD5 | af614b7b95f241849ee3a57deb390424 |
|
BLAKE2b-256 | d4cfbdf7733388dd047671a3fe886aed0f676bf21d796f52bf639c6f66ffe89c |
Hashes for music_brainz_api_micro-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa60c3df5ecce6236b3c8c6247997044bb9926a8a09ee1eb4f60fda40bb43910 |
|
MD5 | fa18d3685eb178ef95ef7c4883fe0a8a |
|
BLAKE2b-256 | d591b48739971bb70221f64f1b9669605543c849571b7c463f559789b5186ff2 |