# Path: nflpool/data/teaminfo.py
# class TeamInfo(SqlAlchemyBase):
#     __tablename__ = "TeamInfo"
#     team_id = sqlalchemy.Column(sqlalchemy.Integer, index=True, primary_key=True)
#     name = sqlalchemy.Column(sqlalchemy.String)
#     city = sqlalchemy.Column(sqlalchemy.String)
#     team_abbr = sqlalchemy.Column(sqlalchemy.String)
#     conference_id = sqlalchemy.Column(sqlalchemy.Integer)
#     division_id = sqlalchemy.Column(sqlalchemy.Integer)
# 
# Path: nflpool/data/dbsession.py
# class DbSessionFactory:
#     factory = None
# 
#     # Start a database session at app startup
#     @staticmethod
#     def global_init(db_file):
#         if DbSessionFactory.factory:
#             return
# 
#         if not db_file or not db_file.strip():
#             raise Exception("You must specify a data file.")
# 
#         conn_str = "sqlite:///" + db_file
#         print("Connecting to db with conn string: {}".format(conn_str))
# 
#         engine = sqlalchemy.create_engine(conn_str, echo=False)
# 
#         SqlAlchemyBase.metadata.create_all(engine)
#         DbSessionFactory.factory = sqlalchemy.orm.sessionmaker(bind=engine)
# 
#     @staticmethod
#     def create_session():
#         return DbSessionFactory.factory()
# 
# Path: nflpool/data/divisioninfo.py
# class DivisionInfo(SqlAlchemyBase):
#     __tablename__ = "DivisionInfo"
#     division_id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
#     division = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/conferenceinfo.py
# class ConferenceInfo(SqlAlchemyBase):
#     __tablename__ = "ConferenceInfo"
#     conf_id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
#     conference = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/picktypes.py
# class PickTypes(SqlAlchemyBase):
#     __tablename__ = "PickTypes"
#     pick_type_id = sqlalchemy.Column(
#         sqlalchemy.Integer, primary_key=True, autoincrement=True
#     )
#     name = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/pick_type_points.py
# class PickTypePoints(SqlAlchemyBase):
#     __tablename__ = "PickTypePoints"
#     primary_key = sqlalchemy.Column(
#         sqlalchemy.Integer, primary_key=True, autoincrement=True
#     )
#     pick_type_id = sqlalchemy.Column(sqlalchemy.Integer)
#     place = sqlalchemy.Column(sqlalchemy.Integer)
#     points = sqlalchemy.Column(sqlalchemy.Integer)
# 
# Path: nflpool/data/seasoninfo.py
# class SeasonInfo(SqlAlchemyBase):
#     __tablename__ = "SeasonInfo"
#     id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True)
#     current_season = sqlalchemy.Column(sqlalchemy.Integer)
#     season_start_date = sqlalchemy.Column(sqlalchemy.String)
#     home_team = sqlalchemy.Column(sqlalchemy.String)
#     away_team = sqlalchemy.Column(sqlalchemy.String)


from nflpool.data.teaminfo import TeamInfo
from requests.auth import HTTPBasicAuth
from nflpool.data.dbsession import DbSessionFactory
from nflpool.data.divisioninfo import DivisionInfo
from nflpool.data.conferenceinfo import ConferenceInfo
from nflpool.data.picktypes import PickTypes
from nflpool.data.pick_type_points import PickTypePoints
from nflpool.data.seasoninfo import SeasonInfo
import requests
import nflpool.data.secret as secret
                    place = y
                    if y == 1:
                        points = 50
                    elif y == 2:
                        points = 30
                    else:
                        points = 20

                    session = DbSessionFactory.create_session()

                    pick_type_points = PickTypePoints(
                        pick_type_id=pick_type_id, place=place, points=points
                    )
                    session.add(pick_type_points)
                    session.commit()

            elif x == 9:
                place = 1
                points = 25
                session = DbSessionFactory.create_session()

                pick_type_points = PickTypePoints(
                    pick_type_id=pick_type_id, place=place, points=points
                )
                session.add(pick_type_points)
                session.commit()

            else:
                place = 1
                points = 1000

# Path: nflpool/data/teaminfo.py
# class TeamInfo(SqlAlchemyBase):
#     __tablename__ = "TeamInfo"
#     team_id = sqlalchemy.Column(sqlalchemy.Integer, index=True, primary_key=True)
#     name = sqlalchemy.Column(sqlalchemy.String)
#     city = sqlalchemy.Column(sqlalchemy.String)
#     team_abbr = sqlalchemy.Column(sqlalchemy.String)
#     conference_id = sqlalchemy.Column(sqlalchemy.Integer)
#     division_id = sqlalchemy.Column(sqlalchemy.Integer)
# 
# Path: nflpool/data/dbsession.py
# class DbSessionFactory:
#     factory = None
# 
#     # Start a database session at app startup
#     @staticmethod
#     def global_init(db_file):
#         if DbSessionFactory.factory:
#             return
# 
#         if not db_file or not db_file.strip():
#             raise Exception("You must specify a data file.")
# 
#         conn_str = "sqlite:///" + db_file
#         print("Connecting to db with conn string: {}".format(conn_str))
# 
#         engine = sqlalchemy.create_engine(conn_str, echo=False)
# 
#         SqlAlchemyBase.metadata.create_all(engine)
#         DbSessionFactory.factory = sqlalchemy.orm.sessionmaker(bind=engine)
# 
#     @staticmethod
#     def create_session():
#         return DbSessionFactory.factory()
# 
# Path: nflpool/data/divisioninfo.py
# class DivisionInfo(SqlAlchemyBase):
#     __tablename__ = "DivisionInfo"
#     division_id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
#     division = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/conferenceinfo.py
# class ConferenceInfo(SqlAlchemyBase):
#     __tablename__ = "ConferenceInfo"
#     conf_id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True)
#     conference = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/picktypes.py
# class PickTypes(SqlAlchemyBase):
#     __tablename__ = "PickTypes"
#     pick_type_id = sqlalchemy.Column(
#         sqlalchemy.Integer, primary_key=True, autoincrement=True
#     )
#     name = sqlalchemy.Column(sqlalchemy.String)
# 
# Path: nflpool/data/pick_type_points.py
# class PickTypePoints(SqlAlchemyBase):
#     __tablename__ = "PickTypePoints"
#     primary_key = sqlalchemy.Column(
#         sqlalchemy.Integer, primary_key=True, autoincrement=True
#     )
#     pick_type_id = sqlalchemy.Column(sqlalchemy.Integer)
#     place = sqlalchemy.Column(sqlalchemy.Integer)
#     points = sqlalchemy.Column(sqlalchemy.Integer)
# 
# Path: nflpool/data/seasoninfo.py
# class SeasonInfo(SqlAlchemyBase):
#     __tablename__ = "SeasonInfo"
#     id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True, autoincrement=True)
#     current_season = sqlalchemy.Column(sqlalchemy.Integer)
#     season_start_date = sqlalchemy.Column(sqlalchemy.String)
#     home_team = sqlalchemy.Column(sqlalchemy.String)
#     away_team = sqlalchemy.Column(sqlalchemy.String)


# Path: nflpool/services/new_install_service.py
from nflpool.data.teaminfo import TeamInfo
from requests.auth import HTTPBasicAuth
from nflpool.data.dbsession import DbSessionFactory
from nflpool.data.divisioninfo import DivisionInfo
from nflpool.data.conferenceinfo import ConferenceInfo
from nflpool.data.picktypes import PickTypes
from nflpool.data.pick_type_points import PickTypePoints
from nflpool.data.seasoninfo import SeasonInfo
import requests
import nflpool.data.secret as secret

                    place = y
                    if y == 1:
                        points = 50
                    elif y == 2:
                        points = 30
                    else:
                        points = 20

                    session = DbSessionFactory.create_session()

                    pick_type_points = PickTypePoints(
                        pick_type_id=pick_type_id, place=place, points=points
                    )
                    session.add(pick_type_points)
                    session.commit()

            elif x == 9:
                place = 1
                points = 25
                session = DbSessionFactory.create_session()

                pick_type_points = PickTypePoints(
                    pick_type_id=pick_type_id, place=place, points=points
                )
                session.add(pick_type_points)
                session.commit()

            else:
                place = 1
                points = 1000

                session = DbSessionFactory.create_session()