docstr: host: the name of the server, from a SASL perspective
  service: the name of the server's service, from a SASL perspective
  mechanism: the name of the preferred mechanism to use
  
  All other kwargs will be passed to the puresasl.client.SASLClient
  constructor.
docstr_tok: ["host",":","the","name","of","the","server",",","from","a","SASL","perspective","service",":","the","name","of","the","server","'s","service",",","from","a","SASL","perspective","mechanism",":","the","name","of","the","preferred","mechanism","to","use","All","other","kwargs","will","be","passed","to","the","puresasl.client.SASLClient","constructor","."]
code: def __init__(
      self,
      client_class,
      iprot_factory,
      oprot_factory=None,
      host=None,
      service=None,
      mechanism="GSSAPI",
      **sasl_kwargs,
  ):
      """
      host: the name of the server, from a SASL perspective
      service: the name of the server's service, from a SASL perspective
      mechanism: the name of the preferred mechanism to use
  
      All other kwargs will be passed to the puresasl.client.SASLClient
      constructor.
      """
  
      from puresasl.client import SASLClient
  
      self.SASLCLient = SASLClient
  
      ThriftClientProtocol.__init__(
          self, client_class, iprot_factory, oprot_factory
      )
  
      self._sasl_negotiation_deferred = None
      self._sasl_negotiation_status = None
      self.client = None
  
      if host is not None:
          self.createSASLClient(host, service, mechanism, **sasl_kwargs)
  
imports: from io import BytesIO
  import struct
  from zope.interface import implementer, Interface, Attribute
  from twisted.internet.protocol import ServerFactory, ClientFactory, connectionDone
  from twisted.internet import defer
  from twisted.internet.threads import deferToThread
  from twisted.protocols import basic
  from twisted.web import server, resource, http
  from thrift.transport import TTransport
label_desc: Use image node_id 1 to create a new ThriftSASLClientProtocol object from inherited base classes: ThriftClientProtocol with example: obj = ThriftSASLClientProtocol(client_class, iprot_factory, oprot_factory, host, service, mechanism)