abstract: | Python interface to Musixmatch API |
---|---|
version: | 0.9 |
author: | Luca De Vitis <luca@monkeython.com> |
organization: | Monkeython |
contact: | |
copyright: | Copyright (C) 2011, Luca De Vitis <luca@monkeython.com>
|
>>> import musixmatch
>>> apikey = '<your-apikey>'
>>> try:
... chart = musixmatch.ws.track.chart.get(country='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.
You can just use setup.py to build and install python-musixmatch:
prompt $ python setup.py 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 setup.py:
prompt $ python setup.py build_sphinx
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 setup.py test
Applications using python-musixmatch may take advantage of standard urllib support for http_proxy, so they can just set up the proper environment variable:
Considering all the available HTTP proxy solutions, I’m reluctant to implement a further caching support. Though i can consider serialization support.
python-musixmatch takes advantage of operating system environment to get apikey, format and api version values to use in API calls:
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:
Keyword arguments are not considered any more.