Package pyechonest :: Module artist :: Class Artist
[hide private]
[frames] | no frames]

Class Artist

source code


An Artist object

Attributes:

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')
Instance Methods [hide private]
 
__init__(self, id, **kwargs)
Artist class
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
__cmp__(self, other) source code
 
get_audio(self, results=15, start=0, cache=True)
Get a list of audio documents found on the web related to an artist
source code
 
get_biographies(self, results=15, start=0, license=None, cache=True)
Get a list of artist biographies
source code
 
get_blogs(self, results=15, start=0, cache=True, high_relevance=False)
Get a list of blog articles related to an artist
source code
 
get_familiarity(self, cache=True)
Get our numerical estimation of how familiar an artist currently is to the world
source code
 
get_foreign_id(self, idspace='musicbrainz', cache=True)
Get the foreign id for this artist for a specific id space
source code
 
get_twitter_id(self, cache=True)
Get the twitter id for this artist if it exists
source code
 
get_hotttnesss(self, cache=True)
Get our numerical description of how hottt an artist currently is
source code
 
get_images(self, results=15, start=0, license=None, cache=True)
Get a list of artist images
source code
 
get_news(self, results=15, start=0, cache=True, high_relevance=False)
Get a list of news articles found on the web related to an artist
source code
 
get_reviews(self, results=15, start=0, cache=True)
Get reviews related to an artist's work
source code
 
get_similar(self, results=15, start=0, buckets=None, limit=False, cache=True, max_familiarity=None, min_familiarity=None, max_hotttnesss=None, min_hotttnesss=None, min_results=None, reverse=False, artist_start_year_before=None, artist_start_year_after=None, artist_end_year_before=None, artist_end_year_after=None)
Return similar artists to this one
source code
 
get_songs(self, cache=True, results=15, start=0)
Get the songs associated with an artist
source code
 
get_terms(self, sort='weight', cache=True)
Get the terms associated with an artist
source code
 
get_urls(self, cache=True)
Get the urls for an artist
source code
 
get_video(self, results=15, start=0, cache=True)
Get a list of video documents found on the web related to an artist
source code
 
get_years_active(self, cache=True)
Get a list of years active dictionaries for an artist
source code
 
get_doc_counts(self, cache=True)
Get the number of related documents of various types for the artist. The types include audio, biographies, blogs, images, news, reviews, songs, videos.
source code

Inherited from proxies.ArtistProxy: get_attribute

Inherited from proxies.GenericProxy: post_attribute

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  audio
Get a list of audio documents found on the web related to an artist
  biographies
Get a list of artist biographies
  blogs
Get a list of blog articles related to an artist
  familiarity
Get our numerical estimation of how familiar an artist currently is to the world
  hotttnesss
Get our numerical description of how hottt an artist currently is
  images
Get a list of artist images
  news
Get a list of news articles found on the web related to an artist
  reviews
Get reviews related to an artist's work
  similar
Return similar artists to this one
  songs
Get the songs associated with an artist
  terms
Get the terms associated with an artist
  urls
Get the urls for an artist
  video
Get a list of video documents found on the web related to an artist
  years_active
Get a list of years active dictionaries for an artist
  doc_counts
Get the number of related documents of various types for the artist. The types include audio, biographies, blogs, images, news, reviews, songs, videos.

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, **kwargs)
(Constructor)

source code 

Artist class

Args:
id (str): an artistw ID
Returns:
An artist object

Example:

>>> a = artist.Artist('ARH6W4X1187B99274F', buckets=['hotttnesss'])
>>> a.hotttnesss
0.80098515900997658
>>>
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
repr(x)
Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

get_audio(self, results=15, start=0, cache=True)

source code 

Get a list of audio documents found on the web related to an artist

Args:

Kwargs:

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

Returns:
A list of audio document dicts; list contains additional attributes 'start' and 'total'

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_biographies(self, results=15, start=0, license=None, cache=True)

source code 

Get a list of artist biographies

Args:

Kwargs:

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

Returns:
A list of biography document dicts; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('britney spears')
>>> bio = a.get_biographies(results=1)[0]
>>> bio['url']
u'http://www.mtvmusic.com/spears_britney'
>>>

get_blogs(self, results=15, start=0, cache=True, high_relevance=False)

source code 

Get a list of blog articles related to an artist

Args:

Kwargs:

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

Returns:
A list of blog document dicts; list contains additional attributes 'start' and 'total'

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_familiarity(self, cache=True)

source code 

Get our numerical estimation of how familiar an artist currently is to the world

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A float representing familiarity.

Example:

>>> a = artist.Artist('frank sinatra')
>>> a.get_familiarity()
0.65142555825947457
>>> a.familiarity
0.65142555825947457
>>>

get_foreign_id(self, idspace='musicbrainz', cache=True)

source code 

Get the foreign id for this artist for a specific id space

Args:

Kwargs:
idspace (str): A string indicating the idspace to fetch a foreign id for.
Returns:
A foreign ID string

Example:

>>> a = artist.Artist('fabulous')
>>> a.get_foreign_id('7digital')
u'7digital:artist:186042'
>>>

get_twitter_id(self, cache=True)

source code 

Get the twitter id for this artist if it exists

Args:

Kwargs:

Returns:
A twitter ID string

Example:

>>> a = artist.Artist('big boi')
>>> a.get_twitter_id()
u'BigBoi'
>>>

get_hotttnesss(self, cache=True)

source code 

Get our numerical description of how hottt an artist currently is

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
float: the hotttnesss value

Example:

>>> a = artist.Artist('hannah montana')
>>> a.get_hotttnesss()
0.59906022155998995
>>> a.hotttnesss
0.59906022155998995
>>>

get_images(self, results=15, start=0, license=None, cache=True)

source code 

Get a list of artist images

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

Returns:
A list of image document dicts; list contains additional attributes 'start' and 'total'

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_news(self, results=15, start=0, cache=True, high_relevance=False)

source code 

Get a list of news articles 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

Returns:
A list of news document dicts; list contains additional attributes 'start' and 'total'

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(self, results=15, start=0, cache=True)

source code 

Get reviews related to an artist's work

Args:

Kwargs:

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

Returns:
A list of review document dicts; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('Ennio Morricone')
>>> reviews = a.reviews
>>> reviews.total
17
>>> reviews[0]['release']
u'For A Few Dollars More'
>>>

get_similar(self, results=15, start=0, buckets=None, limit=False, cache=True, max_familiarity=None, min_familiarity=None, max_hotttnesss=None, min_hotttnesss=None, min_results=None, reverse=False, artist_start_year_before=None, artist_start_year_after=None, artist_end_year_before=None, artist_end_year_after=None)

source code 

Return similar artists to this one

Args:

Kwargs:

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.

Returns:
A list of similar Artist objects

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_songs(self, cache=True, results=15, start=0)

source code 

Get the songs associated with an artist

Args:

Kwargs:

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

Results:
A list of Song objects; list contains additional attributes 'start' and 'total'

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_terms(self, sort='weight', cache=True)

source code 

Get the terms associated with an artist

Args:

Kwargs:

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)

Results:
A list of term document dicts

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_urls(self, cache=True)

source code 

Get the urls for an artist

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Results:
A url document dict

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_video(self, results=15, start=0, cache=True)

source code 

Get a list of video documents found on the web related to an artist

Args:

Kwargs:

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

Returns:
A list of video document dicts; list contains additional attributes 'start' and 'total'

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_years_active(self, cache=True)

source code 

Get a list of years active dictionaries for an artist

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A list of years active dictionaries; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('yelle')
>>> a.get_years_active()
[{ start: 2005 }]
>>>

get_doc_counts(self, cache=True)

source code 

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:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A dictionary with one key for each document type, mapped to an integer count of documents.

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}
 >>>

Property Details [hide private]

audio

Get a list of audio documents found on the web related to an artist

Args:

Kwargs:

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

Returns:
A list of audio document dicts; list contains additional attributes 'start' and 'total'

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 Method:
get_audio(self, results=15, start=0, cache=True) - Get a list of audio documents found on the web related to an artist

biographies

Get a list of artist biographies

Args:

Kwargs:

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

Returns:
A list of biography document dicts; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('britney spears')
>>> bio = a.get_biographies(results=1)[0]
>>> bio['url']
u'http://www.mtvmusic.com/spears_britney'
>>>
Get Method:
get_biographies(self, results=15, start=0, license=None, cache=True) - Get a list of artist biographies

blogs

Get a list of blog articles related to an artist

Args:

Kwargs:

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

Returns:
A list of blog document dicts; list contains additional attributes 'start' and 'total'

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 Method:
get_blogs(self, results=15, start=0, cache=True, high_relevance=False) - Get a list of blog articles related to an artist

familiarity

Get our numerical estimation of how familiar an artist currently is to the world

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A float representing familiarity.

Example:

>>> a = artist.Artist('frank sinatra')
>>> a.get_familiarity()
0.65142555825947457
>>> a.familiarity
0.65142555825947457
>>>
Get Method:
get_familiarity(self, cache=True) - Get our numerical estimation of how familiar an artist currently is to the world

hotttnesss

Get our numerical description of how hottt an artist currently is

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
float: the hotttnesss value

Example:

>>> a = artist.Artist('hannah montana')
>>> a.get_hotttnesss()
0.59906022155998995
>>> a.hotttnesss
0.59906022155998995
>>>
Get Method:
get_hotttnesss(self, cache=True) - Get our numerical description of how hottt an artist currently is

images

Get a list of artist images

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

Returns:
A list of image document dicts; list contains additional attributes 'start' and 'total'

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 Method:
get_images(self, results=15, start=0, license=None, cache=True) - Get a list of artist images

news

Get a list of news articles 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

Returns:
A list of news document dicts; list contains additional attributes 'start' and 'total'

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 Method:
get_news(self, results=15, start=0, cache=True, high_relevance=False) - Get a list of news articles found on the web related to an artist

reviews

Get reviews related to an artist's work

Args:

Kwargs:

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

Returns:
A list of review document dicts; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('Ennio Morricone')
>>> reviews = a.reviews
>>> reviews.total
17
>>> reviews[0]['release']
u'For A Few Dollars More'
>>>
Get Method:
get_reviews(self, results=15, start=0, cache=True) - Get reviews related to an artist's work

similar

Return similar artists to this one

Args:

Kwargs:

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.

Returns:
A list of similar Artist objects

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 Method:
get_similar(self, results=15, start=0, buckets=None, limit=False, cache=True, max_familiarity=None, min_familiarity=None, max_hotttnesss=None, min_hotttnesss=None, min_results=None, reverse=False, artist_start_year_before=None, artist_start_year_after=None, artist_end_year_before=None, artist_end_year_after=None) - Return similar artists to this one

songs

Get the songs associated with an artist

Args:

Kwargs:

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

Results:
A list of Song objects; list contains additional attributes 'start' and 'total'

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 Method:
get_songs(self, cache=True, results=15, start=0) - Get the songs associated with an artist

terms

Get the terms associated with an artist

Args:

Kwargs:

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)

Results:
A list of term document dicts

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 Method:
get_terms(self, sort='weight', cache=True) - Get the terms associated with an artist

urls

Get the urls for an artist

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Results:
A url document dict

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 Method:
get_urls(self, cache=True) - Get the urls for an artist

video

Get a list of video documents found on the web related to an artist

Args:

Kwargs:

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

Returns:
A list of video document dicts; list contains additional attributes 'start' and 'total'

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 Method:
get_video(self, results=15, start=0, cache=True) - Get a list of video documents found on the web related to an artist

years_active

Get a list of years active dictionaries for an artist

Args:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A list of years active dictionaries; list contains additional attributes 'start' and 'total'

Example:

>>> a = artist.Artist('yelle')
>>> a.get_years_active()
[{ start: 2005 }]
>>>
Get Method:
get_years_active(self, cache=True) - Get a list of years active dictionaries for an artist

doc_counts

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:

Kwargs:
cache (bool): A boolean indicating whether or not the cached value should be used (if available). Defaults to True.
Returns:
A dictionary with one key for each document type, mapped to an integer count of documents.

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 Method:
get_doc_counts(self, cache=True) - Get the number of related documents of various types for the artist. The types include audio, biographies, blogs, images, news, reviews, songs, videos.