GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - chrisforrette/python-bandsintown: Bandsintown Python client

BranchesTags
Open more actions menu

Latest commit

 

History

28 Commits
28 Commits

Folders and files

NameName
Last commit message
Last commit date
.circleci
.circleci
 
 
.github
.github
 
 
bandsintown
bandsintown
 
 
tests
tests
 
 
.flake8
.flake8
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 
setup.cfg
setup.cfg
 
 
setup.py
setup.py
 
 

Repository files navigation

Bandsintown Python Client

Simple Python client for version 3 of the Bandsintown API.

See the official API documentation for more details.

Requirements

Python 2.x or 3.x

Installation

pip install python-bandsintown

Instantiation

Your app id can be anything, but usage requires written permission from Bandsintown, see here: http://www.artists.bandsintown.com/bandsintown-api/#1-pick-application-id

from bandsintown import Client
client = Client('mybandapp')

API

artists

Find a single artist by name:

client.artists('Bad Religion')

Example response:

{
  'facebook_page_url': 'https://www.facebook.com/badreligion',
  'upcoming_event_count': 16,
  'name': 'Bad Religion',
  'url': 'https://www.bandsintown.com/a/658?came_from=267&app_id=bandsintown-test-client',
  'tracker_count': 477737,
  'mbid': '149e6720-4e4a-41a4-afca-6d29083fc091',
  'image_url': 'https://s3.amazonaws.com/bit-photos/large/6277078.jpeg',
  'thumb_url': 'https://s3.amazonaws.com/bit-photos/thumb/6277078.jpeg',
  'id': '658'
}

See the official API documentation for this endpoint here: https://app.swaggerhub.com/apis/Bandsintown/PublicAPI/3.0.0#/single_artist_information/artist

artist_events

Get a single artist's events, with an optional date parameter that can be a single date in the format: yyyy-mm-dd, a date range in the format: yyyy-mm-dd,yyyy-mm-dd, or a keyword value of all or upcoming.

client.artist_events('Bad Religion')

Fetch events for a specific date

client.artists_events('Bad Religion', date='2015-08-30')

Fetch events within a date range

client.artists_events('Bad Religion', date='2015-08-30,2015-12-25')

Example Response:

[
  {
    'artist_id': '658',
    'datetime': '2018-05-04T13:00:00',
    'description': '2 Day Pass - Hell and Heaven 2018',
    'id': '20590797',
    'lineup': ['Bad Religion'],
    'offers': [{
      'status': 'available',
      'type': 'Tickets',
      'url': 'https://www.bandsintown.com/t/20590797?app_id=bandsintown-test-client&came_from=267'
    }],
    'on_sale_datetime': '2017-10-09T16:00:00',
    'url': 'https://www.bandsintown.com/e/20590797?app_id=bandsintown-test-client&came_from=267',
    'venue': {
      'city': 'Mexico City',
      'country': 'Mexico',
      'latitude': '19.40259',
      'longitude': '-99.09815',
      'name': 'Aut\xf3dromo Hermanos Rodr\xedguez',
      'region': 'DF'
    }
  }
  # ...
]

See the official API documentation for this endpoint here: https://app.swaggerhub.com/apis/Bandsintown/PublicAPI/3.0.0#/upcoming_artist_events

Errors

BandsintownError

This serves as the base class for other exceptions, so can be used to catch all errors from this client. Currently it's only raised in the artists_events in the event of an unknown error.

BandsintownInvalidAppIdError

This error is raised whenever a request is made with an invalid app id specified at client instantiation.

BandsintownInvalidDateFormatError

This error is raised by the artists_events method when a date parameter is passed in an invalid format.

About

Bandsintown Python client

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.