Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Shows the top artists for a genre
import pyen
import sys
en = pyen.Pyen()
if len(sys.argv) > 1:
genre = ' '.join(sys.argv[1:])
response = en.get('genre/artists', name=genre)
for artist in response['artists']:
print artist['name']
else:
print "usage: python top_artists_for_genre.py genre name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.