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

Class Artist

source code

                  object --+    
                           |    
             base.LastfmBase --+
                               |
                  object --+   |
                           |   |
  mixins.cacheable.Cacheable --+
                               |
                  object --+   |
                           |   |
    mixins.sharable.Sharable --+
                               |
                  object --+   |
                           |   |
  mixins.shoutable.Shoutable --+
                               |
                  object --+   |
                           |   |
mixins.searchable.Searchable --+
                               |
                  object --+   |
                           |   |
    mixins.taggable.Taggable --+
                               |
                              Artist

A class representing an artist.

Instance Methods [hide private]
 
init(self, api, name=None, mbid=None, url=None, image=None, streamable=None, stats=None, similar=None, top_tags=None, bio=None, subject=None)
Create an Artist object by providing all the data related to it.
source code
list of Artist
get_similar(self, limit=None)
Get the artists similar to this artist.
source code
 
_default_params(self, extra_params={}) source code
 
_fill_info(self) source code
 
__hash__(self)
hash(x)
source code
 
__eq__(self, other) source code
 
__lt__(self, other) source code
 
__repr__(self)
repr(x)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from base.LastfmBase
 
__ge__(self, other) source code
 
__gt__(self, other) source code
 
__le__(self, other) source code
 
__ne__(self, other) source code
    Inherited from mixins.sharable.Sharable
 
share(self, *args, **kwargs) source code
    Inherited from mixins.taggable.Taggable
 
add_tags(self, *args, **kwargs) source code
 
remove_tag(self, *args, **kwargs) source code
Class Methods [hide private]
    Inherited from mixins.searchable.Searchable
 
search(cls, api, search_item, limit=None, **kwds) source code
Static Methods [hide private]
Artist
get_info(api, artist=None, mbid=None)
Get the data for the artist.
source code
 
_fetch_data(api, artist=None, mbid=None) source code
 
_search_yield_func(api, artist) source code
 
_hash_func(*args, **kwds) source code
    Inherited from mixins.cacheable.Cacheable
a new object with type S, a subtype of T
__new__(cls, *args, **kwds) source code
 
register(ob, key) source code
Class Variables [hide private]
    Inherited from mixins.cacheable.Cacheable
  _lock = Lock()
  registry = {}
Properties [hide private]
str name
name of the artist
str mbid
MBID of the artist
str url
url of the artist's page
dict image
images of the artist
bool streamable
is the artist streamable on last.fm
Stats stats
stats for the artist
list of Artist similar
artists similar to this artist
Artist most_similar
artist most similar to this artist
list of Tag top_tags
top tags for the artist
Tag top_tag
top tag for the artist
Wiki bio
biography of the artist
lazylist of Event events
events for the artist
list of Album top_albums
top albums of the artist
Album top_album
top album of the artist
list of User top_fans
top fans of the artist
User top_fan
top fan of the artist
list of Track top_tracks
top tracks of the artist
Track top_track
topmost track of the artist

Inherited from object: __class__

    Inherited from mixins.shoutable.Shoutable
  recent_shout
recent shout for this subject
  shouts
shouts for this ssubject
    Inherited from mixins.taggable.Taggable
  tags
Method Details [hide private]

init(self, api, name=None, mbid=None, url=None, image=None, streamable=None, stats=None, similar=None, top_tags=None, bio=None, subject=None)

source code 

Create an Artist object by providing all the data related to it.

Parameters:
  • api (Api) - an instance of Api
  • name (str) - the artist name
  • mbid (str) - MBID of the artist
  • url (str) - URL of the artist on last.fm
  • image (dict) - the images of the artist in various sizes
  • streamable (bool) - flag indicating if the artist is streamable from last.fm
  • stats (Stats) - the artist statistics
  • similar (list of Artist) - artists similar to the provided artist
  • top_tags (list of Tag) - top tags for the artist
  • bio (Wiki) - biography of the artist
  • subject (User OR Artist OR Tag OR Track OR WeeklyChart) - the subject to which this instance belongs to
Raises:
Overrides: mixins.taggable.Taggable.init

get_similar(self, limit=None)

source code 

Get the artists similar to this artist.

Parameters:
  • limit (int) - the number of artists returned (optional)
Returns: list of Artist
artists similar to this artist

get_info(api, artist=None, mbid=None)
Static Method

source code 

Get the data for the artist.

Parameters:
  • api (Api) - an instance of Api
  • artist (str) - the name of the artist
  • mbid (str) - MBID of the artist
Returns: Artist
an Artist object corresponding the provided artist name
Raises:

Note: Use the Api.get_artist method instead of using this method directly.

_default_params(self, extra_params={})

source code 
Overrides: mixins.taggable.Taggable._default_params

_search_yield_func(api, artist)
Static Method

source code 
Overrides: mixins.searchable.Searchable._search_yield_func

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details [hide private]

name

name of the artist

Get Method:
unreachable.name(self) - name of the artist
Type:
str

mbid

MBID of the artist

Get Method:
unreachable.mbid(self) - MBID of the artist
Type:
str

url

url of the artist's page

Get Method:
unreachable.url(self) - url of the artist's page
Type:
str

image

images of the artist

Get Method:
unreachable.image(self) - images of the artist
Type:
dict

streamable

is the artist streamable on last.fm

Get Method:
unreachable.streamable(self) - is the artist streamable on last.fm
Type:
bool

stats

stats for the artist

Get Method:
unreachable.stats(self) - stats for the artist
Type:
Stats

similar

artists similar to this artist

Get Method:
unreachable.similar(self) - artists similar to this artist
Type:
list of Artist

most_similar

artist most similar to this artist

Get Method:
unreachable.wrapper(ob)
Type:
Artist

top_tags

top tags for the artist

Get Method:
unreachable.top_tags(self) - top tags for the artist
Type:
list of Tag

top_tag

top tag for the artist

Get Method:
unreachable.wrapper(ob)
Type:
Tag

bio

biography of the artist

Get Method:
unreachable.bio(self) - biography of the artist
Type:
Wiki

events

events for the artist

Get Method:
unreachable.wrapper(ob)
Type:
lazylist of Event

top_albums

top albums of the artist

Get Method:
unreachable.wrapper(ob)
Type:
list of Album

top_album

top album of the artist

Get Method:
unreachable.wrapper(ob)
Type:
Album

top_fans

top fans of the artist

Get Method:
unreachable.wrapper(ob)
Type:
list of User

top_fan

top fan of the artist

Get Method:
unreachable.wrapper(ob)
Type:
User

top_tracks

top tracks of the artist

Get Method:
unreachable.wrapper(ob)
Type:
list of Track

top_track

topmost track of the artist

Get Method:
unreachable.wrapper(ob)
Type:
Track