classCredentials:""" Credentials for authenticating with the server. """id:strsecret:strdef__init__(self,id:str,secret:str):""" Create a new credentials instance. """self.id=idself.secret=secret@classmethoddefload(cls,file:str|IOBase):""" Load credentials from a file. """ifisinstance(file,str):file=open(file)returncls(**json.load(file))defauth(self):returnBasicAuth(self.id,self.secret)