An Artist object
id (str): Echo Nest Artist ID
name (str): Artist Name
audio (list): Artist audio
biographies (list): Artist biographies
blogs (list): Artist blogs
familiarity (float): Artist familiarity
hotttnesss (float): Artist hotttnesss
images (list): Artist images
news (list): Artist news
reviews (list): Artist reviews
similar (list): Similar Artists
songs (list): A list of song objects
terms (list): Terms for an artist
urls (list): Artist urls
video (list): Artist video
years_active (list): A list of dictionaries containing start and stop years
You create an artist object like this:
>>> a = artist.Artist('ARH6W4X1187B99274F')
>>> a = artist.Artist('the national')
>>> a = artist.Artist('musicbrainz:artist:a74b1b7f-71a5-4011-9441-d0b5e4122711')
Artist class
Example:
>>> a = artist.Artist('ARH6W4X1187B99274F', buckets=['hotttnesss'])
>>> a.hotttnesss
0.80098515900997658
>>>
Get a list of audio documents found on the web related to an artist
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Example:
>>> a = artist.Artist('alphabeat')
>>> a.get_audio()[0]
{u'artist': u'Alphabeat',
u'date': u'2010-04-28T01:40:45',
u'id': u'70be4373fa57ac2eee8c7f30b0580899',
u'length': 210.0,
u'link': u'http://iamthecrime.com',
u'release': u'The Beat Is...',
u'title': u'DJ',
u'url': u'http://iamthecrime.com/wp-content/uploads/2010/04/03_DJ_iatc.mp3'}
>>>
Get a list of artist biographies
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
license (str): A string specifying the desired license type
Example:
>>> a = artist.Artist('britney spears')
>>> bio = a.get_biographies(results=1)[0]
>>> bio['url']
u'http://www.mtvmusic.com/spears_britney'
>>>
Get a list of blog articles related to an artist
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An ingteger starting value for the result set
Example:
>>> a = artist.Artist('bob marley')
>>> blogs = a.get_blogs(results=1,start=4)
>>> blogs.total
4068
>>> blogs[0]['summary']
But the Kenyans I know relate to music about the same way Americans do. They like their Congolese afropop,
and I've known some to be big fans of international acts like <span>Bob</span> <span>Marley</span> and Dolly Parton.
They rarely talk about music that's indigenous in the way a South African or Malian or Zimbabwean would, and it's
even rarer to actually hear such indigenous music. I do sometimes hear ceremonial chanting from the Maasai, but only
when they're dancing for tourists. If East Africa isn't the most musical part ... "
>>>
Get the number of related documents of various types for the artist. The types include audio, biographies, blogs, images, news, reviews, songs, videos.
Note that these documents can be retrieved by calling artist.<document type>, for example, artist.biographies.
Args:
Example:
>>> a = artist.Artist("The Kinks")
>>> a.get_doc_counts()
{u'audio': 194,
u'biographies': 9,
u'blogs': 379,
u'images': 177,
u'news': 84,
u'reviews': 110,
u'songs': 499,
u'videos': 340}
>>>
Get our numerical estimation of how familiar an artist currently is to the world
Args:
Example:
>>> a = artist.Artist('frank sinatra')
>>> a.get_familiarity()
0.65142555825947457
>>> a.familiarity
0.65142555825947457
>>>
Get the foreign id for this artist for a specific id space
Args:
Example:
>>> a = artist.Artist('fabulous')
>>> a.get_foreign_id('7digital')
u'7digital:artist:186042'
>>>
Get our numerical description of how hottt an artist currently is
Args:
Example:
>>> a = artist.Artist('hannah montana')
>>> a.get_hotttnesss()
0.59906022155998995
>>> a.hotttnesss
0.59906022155998995
>>>
Get a list of artist images
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
license (str): A string specifying the desired license type
Example:
>>> a = artist.Artist('Captain Beefheart')
>>> images = a.get_images(results=1)
>>> images.total
49
>>> images[0]['url']
u'http://c4.ac-images.myspacecdn.com/images01/5/l_e1a329cdfdb16a848288edc6d578730f.jpg'
>>>
Get a list of news articles found on the web related to an artist
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Example:
>>> a = artist.Artist('Henry Threadgill')
>>> news = a.news
>>> news.total
41
>>> news[0]['name']
u'Jazz Journalists Association Announces 2010 Jazz Award Winners'
>>>
Get reviews related to an artist’s work
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Example:
>>> a = artist.Artist('Ennio Morricone')
>>> reviews = a.reviews
>>> reviews.total
17
>>> reviews[0]['release']
u'For A Few Dollars More'
>>>
Return similar artists to this one
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
max_familiarity (float): A float specifying the max familiarity of artists to search for
min_familiarity (float): A float specifying the min familiarity of artists to search for
max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
reverse (bool): A boolean indicating whether or not to return dissimilar artists (wrecommender). Defaults to False.
Example:
>>> a = artist.Artist('Sleater Kinney')
>>> similars = a.similar[:5]
>>> similars
[<artist - Bikini Kill>, <artist - Pretty Girls Make Graves>, <artist - Huggy Bear>, <artist - Bratmobile>, <artist - Team Dresch>]
>>>
Get the songs associated with an artist
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Example:
>>> a = artist.Artist('Strokes')
>>> a.get_songs(results=5)
[<song - Fear Of Sleep>, <song - Red Light>, <song - Ize Of The World>, <song - Evening Sun>, <song - Juicebox>]
>>>
Get the terms associated with an artist
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
sort (str): A string specifying the desired sorting type (weight or frequency)
Example:
>>> a = artist.Artist('tom petty')
>>> a.terms
[{u'frequency': 1.0, u'name': u'heartland rock', u'weight': 1.0},
{u'frequency': 0.88569401860168606,
u'name': u'jam band',
u'weight': 0.9116501862732439},
{u'frequency': 0.9656145118557401,
u'name': u'pop rock',
u'weight': 0.89777934440040685},
{u'frequency': 0.8414744288140491,
u'name': u'southern rock',
u'weight': 0.8698567153186606},
{u'frequency': 0.9656145118557401,
u'name': u'hard rock',
u'weight': 0.85738022655218893},
{u'frequency': 0.88569401860168606,
u'name': u'singer-songwriter',
u'weight': 0.77427243392312772},
{u'frequency': 0.88569401860168606,
u'name': u'rock',
u'weight': 0.71158718989399083},
{u'frequency': 0.60874110500110956,
u'name': u'album rock',
u'weight': 0.69758668733499629},
{u'frequency': 0.74350792060935744,
u'name': u'psychedelic',
u'weight': 0.68457367494207944},
{u'frequency': 0.77213698386292873,
u'name': u'pop',
u'weight': 0.65039556639337293},
{u'frequency': 0.41747136183050298,
u'name': u'bar band',
u'weight': 0.54974975024767025}]
>>>
Get the twitter id for this artist if it exists
Args:
Kwargs:
Example:
>>> a = artist.Artist('big boi')
>>> a.get_twitter_id()
u'BigBoi'
>>>
Get the urls for an artist
Args:
Example:
>>> a = artist.Artist('the unicorns')
>>> a.get_urls()
{u'amazon_url': u'http://www.amazon.com/gp/search?ie=UTF8&keywords=The Unicorns&tag=httpechonecom-20&index=music',
u'aolmusic_url': u'http://music.aol.com/artist/the-unicorns',
u'itunes_url': u'http://itunes.com/TheUnicorns',
u'lastfm_url': u'http://www.last.fm/music/The+Unicorns',
u'mb_url': u'http://musicbrainz.org/artist/603c5f9f-492a-4f21-9d6f-1642a5dbea2d.html',
u'myspace_url': u'http://www.myspace.com/iwasbornunicorn'}
>>>
Get a list of video documents found on the web related to an artist
Args:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
results (int): An integer number of results to return
start (int): An integer starting value for the result set
Example:
>>> a = artist.Artist('the vapors')
>>> a.get_video(results=1, start=2)
[{u'date_found': u'2009-12-28T08:27:48',
u'id': u'd02f9e6dc7904f70402d4676516286b9',
u'image_url': u'http://i1.ytimg.com/vi/p6c0wOFL3Us/default.jpg',
u'site': u'youtube',
u'title': u'The Vapors-Turning Japanese (rectangular white vinyl promo)',
u'url': u'http://youtube.com/watch?v=p6c0wOFL3Us'}]
>>>
Get a list of years active dictionaries for an artist
Args:
Example:
>>> a = artist.Artist('yelle')
>>> a.get_years_active()
[{ start: 2005 }]
>>>
Search for artists by name, description, or constraint.
Args:
name (str): the name of an artist
description (str): A string describing the artist
style (str): A string describing the style/genre of the artist
mood (str): A string describing the mood of the artist
start (int): An integer starting value for the result set
results (int): An integer number of results to return
buckets (list): A list of strings specifying which buckets to retrieve
limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets
fuzzy_match (bool): A boolean indicating whether or not to search for similar sounding matches (only works with name)
max_familiarity (float): A float specifying the max familiarity of artists to search for
min_familiarity (float): A float specifying the min familiarity of artists to search for
max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
artist_start_year_before (int): Returned artists will have started recording music before this year.
artist_start_year_after (int): Returned artists will have started recording music after this year.
artist_end_year_before (int): Returned artists will have stopped recording music before this year.
artist_end_year_after (int): Returned artists will have stopped recording music after this year.
rank_type (str): A string denoting the desired ranking for description searches, either ‘relevance’ or ‘familiarity’
Example:
>>> results = artist.search(name='t-pain')
>>> results
[<artist - T-Pain>, <artist - T-Pain & Lil Wayne>, <artist - T Pain & 2 Pistols>, <artist - Roscoe Dash & T-Pain>, <artist - Tony Moxberg & T-Pain>, <artist - Flo-Rida (feat. T-Pain)>, <artist - Shortyo/Too Short/T-Pain>]
>>>
Get the top hotttest artists, according to The Echo Nest
Args:
results (int): An integer number of results to return
start (int): An integer starting value for the result set
buckets (list): A list of strings specifying which buckets to retrieve
limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets
Example:
>>> hot_stuff = artist.top_hottt()
>>> hot_stuff
[<artist - Deerhunter>, <artist - Sufjan Stevens>, <artist - Belle and Sebastian>, <artist - Glee Cast>, <artist - Linkin Park>, <artist - Neil Young>, <artist - Jimmy Eat World>, <artist - Kanye West>, <artist - Katy Perry>, <artist - Bruno Mars>, <artist - Lady Gaga>, <artist - Rihanna>, <artist - Lil Wayne>, <artist - Jason Mraz>, <artist - Green Day>]
>>>
Get a list of the top overall terms
Args:
Example:
>>> terms = artist.top_terms(results=5)
>>> terms
[{u'frequency': 1.0, u'name': u'rock'},
{u'frequency': 0.99054710039307992, u'name': u'electronic'},
{u'frequency': 0.96131624654034398, u'name': u'hip hop'},
{u'frequency': 0.94358477322411127, u'name': u'jazz'},
{u'frequency': 0.94023302416455468, u'name': u'pop rock'}]
>>>
Return similar artists to this one
Args:
ids (str/list): An artist id or list of ids
names (str/list): An artist name or list of names
results (int): An integer number of results to return
buckets (list): A list of strings specifying which buckets to retrieve
limit (bool): A boolean indicating whether or not to limit the results to one of the id spaces specified in buckets
start (int): An integer starting value for the result set
max_familiarity (float): A float specifying the max familiarity of artists to search for
min_familiarity (float): A float specifying the min familiarity of artists to search for
max_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
min_hotttnesss (float): A float specifying the max hotttnesss of artists to search for
seed_catalog (str): A string specifying the catalog similar artists are restricted to
Example:
>>> some_dudes = [artist.Artist('weezer'), artist.Artist('radiohead')]
>>> some_dudes
[<artist - Weezer>, <artist - Radiohead>]
>>> sims = artist.similar(ids=[art.id for art in some_dudes], results=5)
>>> sims
[<artist - The Smashing Pumpkins>, <artist - Biffy Clyro>, <artist - Death Cab for Cutie>, <artist - Jimmy Eat World>, <artist - Nerf Herder>]
>>>