from flask import Flask, redirect, session, request, render_template, url_for, flash, jsonify, send_file, make_response from helpers.s3 import S3 from helpers.constants import Constants from helpers.githubuser import GithubUser, PublicGithubUser from helpers.githubbot import GithubBot from helpers.sources.osenv import OSConstants from helpers.sources.mongo import MongoConstants from helpers.extensions import LanguageExtensions import os, time, datetime app = Flask(__name__) dev = os.environ.get('dev') == 'true' or not os.environ.get('PORT') constants = Constants(OSConstants()) app.secret_key = constants.get('SK') extensions = LanguageExtensions() LANGS = dict( zip( constants.get('GH_REPOS').split(','), constants.get('LANGS').split(';'))) CURRENT = dict( zip( constants.get('GH_REPOS').split(','), constants.get('CURRENT').split(';'))) try: s3 = S3(constants.get('AWS_ACCESS_KEY'), constants.get('AWS_SECRET_KEY'), constants.get('AWS_BUCKET')) except: s3 = None