pyechonest

Python interface to The Echo Nest APIs
Download

pyechonest Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Publisher Name:
  • Tyler Williams

pyechonest Tags


pyechonest Description

Python interface to The Echo Nest APIs pyechonest is a client library that should allow you to get started using the Echo Nest API quickly and easily. The only requirement is a developer API key, which you can get for free from http://developer.echonest.com/account/register/.For documentation questions, please refer to the official api docs, which are available at http://developer.echonest.com/.IMPORTANT: You must let pyechonest know about your API key before you use it. There are two ways to let pyechonest know about your API key: 1. Set the variable ECHO_NEST_API_KEY in your environment to your key. (bourne-like shells) $ export ECHO_NEST_API_KEY=YOUR_API_KEY (c-like shells) $ setenv ECHO_NEST_API_KEY YOUR_API_KEY 2. In Python, do this: >>> from pyechonest import config >>> config.ECHO_NEST_API_KEY = YOUR_API_KEYExamples: Search for artist: >>> from pyechonest import artist >>> weezer_results = artist.search(query='weezer') >>> weezer = weezer_results >>> weezer_blogs = weezer.blogs >>> print 'Blogs about weezer:', Get an artist by name: >>> from pyechonest import artist >>> a = artist.Artist('lady gaga') >>> print a.id Get an artist from their Musicbrainz ID: >>> from pyechonest import artist >>> a = artist.Artist('musicbrainz:artist:a74b1b7f-71a5-4011-9441-d0b5e4122711') >>> print a.name Get the top hottt artists: >>> from pyechonest import artist >>> for hottt_artist in artist.top_hottt(): >>> print hottt_artist.name, hottt_artist.hotttnesss Search for songs: >>> from pyechonest import song >>> rkp_results = song.search(artist='radiohead', title='karma police') >>> karma_police = rkp_results >>> print karma_police.artist_location >>> print karma_police.audio_summary.tempo, karma_police.audio_summary.duration Get a song's audio_url and analysis_url: >>> from pyechonest import song >>> wn_results = song.search(combined='the national - wasp nest') >>> wasp_nest = wn_results >>> wn_tracks = wasp_nest.tracks >>> print wn_tracks.audio_url >>> print wn_tracks.analysis_url Requirements: · Python


pyechonest Related Software