Picard Plugin Development for Autoratings - XML Parsing



I am looking to create a plugin that automatically rates your music library. However, I am new to Python and am not sure how to get the data I need. I am trying to use the Last.FM API to get listeners and playcount tags from artist.getInfo and track.getInfo.

I was able to get this data using xml.etree.ElementTree and pylast libraries in python, but I do not know how to get these to work with Picard.

Does anyboy have any ideas how to get this data using Picards libraries or import the libraries that I could get it to work with?