# Path: nflpool/data/modelbase.py



import sqlalchemy
import sqlalchemy.orm
import nflpool.data.account
import nflpool.data.activeplayers
import nflpool.data.seasoninfo
import nflpool.data.player_picks
import nflpool.data.points
import nflpool.data.teaminfo
import nflpool.data.passwordreset
import nflpool.data.picktypes
import nflpool.data.conferenceinfo
import nflpool.data.divisioninfo
import nflpool.data.pick_type_points
import nflpool.data.picktypes
from nflpool.data.modelbase import SqlAlchemyBase

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences


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.")


# Path: nflpool/data/modelbase.py



# Path: nflpool/data/dbsession.py
import sqlalchemy
import sqlalchemy.orm
import nflpool.data.account
import nflpool.data.activeplayers
import nflpool.data.seasoninfo
import nflpool.data.player_picks
import nflpool.data.points
import nflpool.data.teaminfo
import nflpool.data.passwordreset
import nflpool.data.picktypes
import nflpool.data.conferenceinfo
import nflpool.data.divisioninfo
import nflpool.data.pick_type_points
import nflpool.data.picktypes
from nflpool.data.modelbase import SqlAlchemyBase


# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences

# noinspection PyUnresolvedReferences


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