Hey guys, I've just commited 0.4 to svn and pypi a few moments ago.
I've been working on it for the last couple of days and I think it's
in good shape now.
What's totally new in 0.4 is total abstraction of the network you're
dealing with, so that pylast can be used with other API compatible
websites like Libre.fm and I don't have to maintain two separate
libraries like I previously intended to.
Almost every object now takes a Network object aside its own
parameters (like it used to take api_key, api_secret, and
session_key).
Since configuring a network is a daunting job, I've added acouple of
get_networkname_network( ... ) functions that does all the work for
you and returns a Network object that you can use pretty quickly.
Also the code for caching, proxy has been moved to Network class along
with another couple functions that were global to the module.
I've also the new webservices that surfaced recently supporting shouts
and get_images and several more.
Here's an example of how the new code works:
instead of doing this:
artist = pylast.Artist("system of a down", API_KEY, API_SECRET)
you do something like this:
network = pylast.get_lastfm_network(api_key = API_KEY, api_secret =
API_SECRET, username = "rj", password_hash =
pylast.md5("totally_not_my_password"))
artist = pylast.Artist("system of a down", network)
Checkout help(pylast.get_lastfm_network) for more help and on
everything for that matter, I've tried to document everything in much
detail as possible.
Feel free to start issuing reports. I'm all ready now =)
P.S. Porting code to 0.4 should be a lot easier than you might think.
-- Amr