zackster/HipHopGoblin
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Welcome to pyechonest, a python wrapper around the Echo Nest API (v4). This client library 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_KEY Examples: Search for artist: >>> from pyechonest import artist >>> weezer_results = artist.search(name='weezer') >>> weezer = weezer_results[0] >>> weezer_blogs = weezer.blogs >>> print 'Blogs about weezer:', [blog.get('url') for blog in weezer_blogs] 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[0] >>> print karma_police.artist_location >>> print 'tempo:',karma_police.audio_summary['tempo'],'duration:',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', buckets=['id:7digital'], limit=True) >>> wasp_nest = wn_results[0] >>> wn_tracks = wasp_nest.get_tracks('7digital') >>> print wn_tracks[0].get('preview_url')
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published