@staticmethod
    def find_player(steam_id=None, steam_name=None, name=None, exact_match=True):
        try:
            player = None


            if steam_id:
                player = DbCore.session.query(Player).filter_by(steam_id=steam_id).first()
            elif steam_name:
                players = DbCore.session.query(Player).filter_by(steam_name=steam_name)
                if exact_match:
                    if players.count() == 1:
                        player = players.first()
                else:
                    player = players.first()
            elif name:
                players = DbCore.session.query(Player).filter_by(name=name)
                if exact_match:
                    if players.count() == 1:
                        player = players.first()
                else:
                    player = players.first()
            else:
                out('ERROR: No search parameters in DbCore.find_player')

            if player:
                    return player
            return None
        except exc.SQLAlchemyError as e:
            out('SQL Failure to find player:',e)
            DbCore.reconnect()
            return None
Find player by steam_name, name or steam id
dataset/ETHPy150Open f4ble/pyarc/ark/database/helper.py/Db.find_player