Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/ pytinysong Public archive

Deprecated: Talk to the Tinysong API using Python

Notifications You must be signed in to change notification settings

davidk/pytinysong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytinysong

2015/05/01: Grooveshark has shut down. This means pytinysong is no longer useful, since Tinysong was backed by Grooveshark. It's been a good run.

A Python interface to the Tinysong (Grooveshark backed) service:

>>> from pytinysong.request import TinySongRequest
>>> song = TinySongRequest(api_key='z1cx2j1mgk19jm3j')
>>> results = song.search('Overseer - Supermoves')
>>> for song in results:
...     print(song.artist_name, '-', song.song_name)
... 
Overseer - Supermoves
Overseer - Supermoves [Animatrix Remix]

About the API key

TinySong now requires an API key. Registration is available by visiting the TinySong website.

Song() object properties

  • url -- A link to the song on TinySong/Grooveshark
  • song_id -- ID of the song retrieved
  • song_name -- Name of the song retrieved
  • artist_id -- ID of the artist
  • artist_name -- Name of the artist
  • album_id -- ID of the album retrieved
  • album_name -- Name of the album retrieved

These properties are also available in CamelCase (similar to the exported JSON keys from Tinysong):

  • Url
  • SongID
  • SongName
  • ArtistID
  • ArtistName
  • AlbumID
  • AlbumName

Available Methods

Where query is a string (usually something like the artist name, or the name+song title):

  • request_link(query) -- Returns a (string) link to the song
  • request_metadata(query) -- Returns a Song() object with the song data
  • search(query) -- Returns a list of Song() objects with data on various songs

License

CC0 Public Domain. Using it for world domination is (still) allowed. More information here.

About

Deprecated: Talk to the Tinysong API using Python

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages