[docs]classTokenAuth(AuthBase):""" requests Authentication for token based authorization. This allows us to attach the Authorization header with a token to a session. """def__init__(self,token:str)->None:self.token=tokendef__eq__(self,other:object)->bool:returnself.token==getattr(other,"token",None)def__ne__(self,other:object)->bool:returnnotself==otherdef__call__(self,req:PreparedRequest)->PreparedRequest:req.headers["Authorization"]=f"token {self.token}"returnreq