在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:echonest/pyechonest开源软件地址:https://github.com/echonest/pyechonest开源编程语言:Python 95.9%开源软件介绍:PyechonestTap into The Echo Nest's Musical Brain for the best music search, information, recommendations and remix tools on the web. Pyechonest is an open source Python library for the Echo Nest API. With Pyechonest you have Python access to the entire set of API methods including:
InstallThere are a few different ways you can install pyechonest:
Getting Started
from pyechonest import config
config.ECHO_NEST_API_KEY="YOUR API KEY"
ExamplesAll examples assume you have already setup your api key! Find artists that are similar to 'Bikini Kill': from pyechonest import artist
bk = artist.Artist('bikini kill')
print "Artists similar to: %s:" % (bk.name,)
for similar_artist in bk.similar: print "\t%s" % (similar_artist.name,) 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 by 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
ss_results = song.search(artist='the national', title='slow show', buckets=['id:7digital-US', 'tracks'], limit=True)
slow_show = ss_results[0]
ss_tracks = slow_show.get_tracks('7digital-US')
print ss_tracks[0].get('preview_url') |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论