statssession = requests.Session()
getstats = statssession.get('https://api.hypixel.net/player',
params={'key': random.choice([key, key2]), 'uuid': playeruuid},
timeout=10).json()
I'm completely new to python with no OOP experience and this bit of code throws a random time out exception for read randomly. What I want is when it throws that exception to not just break my code but retry the request instead preferably with the library from requests itself but I have no idea how to do it so here I'm asking, any help appreciated.