}) event_combinations.append(calendar_events) return jsonify(events) else: print 'Invalid parameters term=%s, busyTimes=%s, sections=%s, courses=%s' % (term, busy_times, sections, courses_array) return '' if __name__ == '__main__': app.COLUMBIA_DAYS = "UMTWRFS" app.COLUMBIA_DAYS_DICT = { "U": "Sunday", "M": "Monday", "T": "Tuesday", "W": "Wednesday", "R": "Thursday", "F": "Friday", "S": "Saturday" } app.COURSE_DESCRIPTION_MAX_LENGTH = 600 app.DATA_ADICU_COM_API_KEY = os.environ.get('DATA_ADICU_COM_API_KEY') # Bind to PORT if defined, otherwise default to 5000. port = int(os.environ.get('PORT', 5000)) if os.environ.get('DEBUG'): print Fore.RED, 'Running in DEBUG mode!' app.debug = True app.run(host='0.0.0.0', port=port)