Skip to main content

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

music_brainz_api_micro-0.1.8.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

music_brainz_api_micro-0.1.8-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file music_brainz_api_micro-0.1.8.tar.gz.

File metadata

File hashes

Hashes for music_brainz_api_micro-0.1.8.tar.gz
Algorithm Hash digest
SHA256 f2efe4a06b05c327aab1a567681d4c2f9cefcdfc2862bea700c03022c04c28c2
MD5 a253a020e8b58691bc9102c617ee93e8
BLAKE2b-256 617e3071e3a02bfb209baa37f063c52cd7d0f0a1b19118c37d74c25d0cc3e77d

See more details on using hashes here.

File details

Details for the file music_brainz_api_micro-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for music_brainz_api_micro-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 09fed6f5b6183d10918dd6452621b29d5d805778abe52b582dd777fc7e8547b0
MD5 524bc0a2eeb60cc4ff290a35cef944fb
BLAKE2b-256 3a7ae9d04e082e351eed43477dec38e4b51929131b68ec2c739b013c5e2e610e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page