PyAmz

PyAmz is a library/standalone script written in Python for handling .amz files from Amazon MP3. The official Amazon MP3 downloader for Linux is unusably outdated and non-free. Both encrypted (as supplied by Amazon MP3) and unencrypted (as apparently supplied by the Amazon cloud music service) .amz files are supported.
Comments, bugs, etc may be emailed to amarok _at_ sentynel _dot_ com.
PyAmz's source code is public domain. The source code, hosted on Gitorious, can be accessed here.

Requirements

You will need: Python 2.7 (for standalone use) or Python 2.4 or newer (for library) use, one of PyCrypto (fast) or pyDes (slow, but pure Python so easier to deploy) for encrypted AMZ handling, and lxml for parsing the XML.

Usage

Basic standalone usage to download all tracks in a particular file: ./pyamz.py AmazonMP3-1234567890.amz
Useful options: -w to use external wget to download (helpful if you have a rubbish internet connection); -n filepath to specify the output file format (use field specifiers such as {artist}); -h for usage help.
Library usage: pyamz.decrypt(amz_contents) returns the decrypted XML. pyamz.parse(xml) returns a list of dictionaries holding information on the tracks specified in the xml.
Download it here!

Valid XHTML 1.0 Transitional