Jingju API

compmusic.dunya.jingju.download_mp3(recordingid, location)[source]

Download the mp3 of a document and save it to the specificed directory.

Parameters:
  • recordingid – The MBID of the recording
  • location – Where to save the mp3 to
compmusic.dunya.jingju.download_release(release_id, location)[source]

Download the mp3s of all recordings in a release and save them to the specificed directory.

Parameters:
  • release – The MBID of the release
  • location – Where to save the mp3s to
compmusic.dunya.jingju.get_artist(ambid)[source]

Get specific information about an artist.

Parameters:ambid – An artist mbid
Returns:alias, instrument, mbid, name, recordings, role_type.
compmusic.dunya.jingju.get_artists()[source]

Get a list of Jingju artists in the database. This function will automatically page through API results.

returns: A list of dictionaries containing artist information:

{"mbid": Musicbrainz artist id,
"name": Name of the artist}

For additional information about each artist use get_artist()

compmusic.dunya.jingju.get_recording(rmbid)[source]

Get specific information about a recording.

Parameters:rmbid – A recording mbid
Returns:instrumentalists, mbid, performers, release, shengqiangbanshi, title, work.
compmusic.dunya.jingju.get_recordings(recording_detail=False)[source]

Get a list of jingju recordings in the database. This function will automatically page through API results.

Parameters:recording_detail – if True, return full details for each recording like get_recording()

returns: A list of dictionaries containing recording information:

{"mbid": Musicbrainz recording id,
 "title": Title of the recording
}

For additional information about each recording use get_recording().

compmusic.dunya.jingju.get_release(rmbid)[source]

Get specific information about a release.

Parameters:rmbid – A release mbid
Returns:artists, mbid, recordings, title.
compmusic.dunya.jingju.get_releases()[source]

Get a list of Jingju releases in the database. This function will automatically page through API results.

returns: A list of dictionaries containing release information:

{"mbid": Musicbrainz release id,
 "title": title of the release
}

For additional information about each release use get_release()

compmusic.dunya.jingju.get_work(wmbid)[source]

Get specific information about a work.

Parameters:wmbid – A work mbid
Returns:mbid, play, recordings, score, title.
compmusic.dunya.jingju.get_works()[source]

Get a list of Carnatic works in the database. This function will automatically page through API results.

returns: A list of dictionaries containing work information:

{"mbid": Musicbrainz work id,
 "name": work name
}

For additional information about each work use get_work().

compmusic.dunya.jingju.set_collections(collections)[source]

Set a list of collections mbid to restrict the queries. You must call this before you can make any other calls, otherwise they won’t be restricted.

Arguments:
collections: list of collections mbids