Python wrapper anround Bandsintown API
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
bandsintown.py

README

"""
Example how to use the Bandsintown client in Python
"""

import bandsintown

bandsintown.app_id = "musichackdaysthlm_test"

def print_events(events):
	for e in events:
		print "%s %s (%s %s)" % (e.venue.name, e.datetime, e.venue.city, e.venue.country)
		print "  %s" % (", ".join([a.name for a in e.artists]), )


artist = bandsintown.Artist.get(mbid="65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab")
print "Name: %s" % (artist.name, )

events = bandsintown.Artist.events(mbid="65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab")
print_events(events)

events = bandsintown.Event.search(location="Stockholm", per_page=10)
print_events(events)

events = bandsintown.Event.recommended(mbids=["65f4f0c5-ef9e-490c-aee3-909e7ae6b2ab"], location="Stockholm", per_page=10)
print_events(events)

events = bandsintown.Event.daily()
print_events(events)