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
Release history Release notifications | RSS feed
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
File details
Details for the file music_brainz_api_micro-0.1.8.tar.gz
.
File metadata
- Download URL: music_brainz_api_micro-0.1.8.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2efe4a06b05c327aab1a567681d4c2f9cefcdfc2862bea700c03022c04c28c2 |
|
MD5 | a253a020e8b58691bc9102c617ee93e8 |
|
BLAKE2b-256 | 617e3071e3a02bfb209baa37f063c52cd7d0f0a1b19118c37d74c25d0cc3e77d |
File details
Details for the file music_brainz_api_micro-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: music_brainz_api_micro-0.1.8-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09fed6f5b6183d10918dd6452621b29d5d805778abe52b582dd777fc7e8547b0 |
|
MD5 | 524bc0a2eeb60cc4ff290a35cef944fb |
|
BLAKE2b-256 | 3a7ae9d04e082e351eed43477dec38e4b51929131b68ec2c739b013c5e2e610e |