I have defined this class:
class User():
def __init__(self, ip, update, priority):
self.ip = ip
self.update = update
self.priority = priority
I work with a Socket and every time one client is connect I create an User object. I would like to save it somewhere and then be able to process its data, meaning read the file where it's saved. I don't know how to do that. I tried using a txt file but with the fields of the class User is to complicated and I would also like to have something more dynamic, like
add(user), isPresent(user), overwrite(user)
What is the best solution for my case?