It doesn't seem like what you want is actually possible with the last.fm api. Only top-level tags are available through api . However, they are not completely clear what constitutes the top tag. So this may be enough for your needs. The attempt to create several different performers of the number of results that I get is very different.
Here is a sample code to get you started.
from pylast import *
pylast really has really good documentation. What I do most often is just start the shell and call for help on different pylast objects. It explains most of the function. The source is also very readable, so this is also a good place to find out how it works. So in this case:
help(TopItem) help(Track) help(Tag)
source share