def main():
    global db_password
    db_password = sys.argv[1]

    engine = sql_alchemy_utils.build_engine(db_password)
    session = sql_alchemy_utils.build_session(engine)

    for player, stats in get_all_player_stats():
        if stats: #Batters only, not getting pitchers now.
            write_player_and_stats(session, player, stats)

    return 0
def reload_schema(db_password):
    engine = build_engine(db_password)
    Base.metadata.bind = engine
    Base.metadata.drop_all()
    Base.metadata.create_all()
def load_schema():
    engine = build_engine(db_password)
    Base.metadata.create_all(engine)