def load_player_by_id(player_id): try: return (Player.get(Player.cfn_id == player_id)) except Player.DoesNotExist: raise PlayerDoesNotExist()
def load_player_by_approx_name(name): try: return (Player.get(LowerStr(Player.name) == name.lower())) except Player.DoesNotExist: raise PlayerDoesNotExist()
def load_player_by_name(name): try: return (Player.get(Player.name == name, Player.subscribed == 1)) except Player.DoesNotExist: raise PlayerDoesNotExist()