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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80f68defa2bb98b1e21f87dd35174438150bda5915d6526d8ca72ffc90fc529d |
|
MD5 | fe4bab747f18da7425721c52e32961d5 |
|
BLAKE2b-256 | d2b193acc182ce23962148fd6ae84be0f73115385f056efb6d7670878b00321b |
Hashes for music_brainz_api_micro-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96de558086aadfa9bb533aa14c843e8e3a8aa5140e7e9bc33271779929d02b02 |
|
MD5 | 94c673b5c73f16d963065551252ff994 |
|
BLAKE2b-256 | f67eb413952d3ace472a1c51f7e7f11d17498db582cf700df15bea9b394ea3bf |