Package overview


Python interface to Musixmatch API




Luca De Vitis <>





Copyright (C) 2011, Luca De Vitis <>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.

Quick start

  1. First thing first, read the documentation at .
  2. Get an api key by signing up at .
  3. Install the musixmatch package
  4. Run the python prompt
>>> import musixmatch
>>> apikey = '<your-apikey>'
>>> try:
...     chart ='it', apikey=apikey)
... except musixmatch.api.Error, e:
...     pass

It’s that simple. Last, you can brows this documentation and have fun with the other modules.

Building / Installing

You can just use to build and install python-musixmatch:

prompt $ python bdist_egg

Once built, you can use easy_install on the python egg.


You can read documentation online, or generate your own local copy using Sphinx trough the

prompt $ python build_sphinx

Unit testing

python-musixmatch comes with some essential unit testing. If you set up musixmatch_apikey environment variable, and have internet connection, you can also run some tests on API calls:

prompt $ python test

Caching support

Applications using python-musixmatch may take advantage of standard urllib support for http_proxy, so they can just set up the proper environment variable:

the complete HTTP proxy URL to use in queries.

Considering all the available HTTP proxy solutions, I’m reluctant to implement a further caching support. Though i can consider serialization support.

Environment variables

python-musixmatch takes advantage of operating system environment to get apikey, format and api version values to use in API calls:

the apikey value to use in query strings
the response message format. For example: json
the webservice base url. For example:
the api version to use in queryes. For example: 1.1. Use of musixmatch_apiversion was deprecated in favour of musixmatch_wslocation.


  • Added support for XML response messages.

  • Deprecated musixmatch_apiversion environment variable in favour of musixmatch_wslocation. This will let developers to setup different api location and a testing environment. (musicae-ipsum under construction)

  • apikey and format in api.Method are now lookedup as follow:

    1. Positional arguments.
    2. Package wide variables.
    3. Operating system environment.

    Keyword arguments are not considered any more.

  • API interface with JSON response support.
  • Low level objects library built around JSON response messages.

Indices and tables

Table Of Contents

Next topic

1. api module

This Page