def make_sasl_transport_factory(credential_factory):

    def sasl_transport_factory(tsocket, host, port):
        sasl_kwargs = credential_factory(host, port)
        sasl_transport = TSaslClientTransport(tsocket, **sasl_kwargs)
        return TTransport.TFramedTransport(sasl_transport)

    return sasl_transport_factory
A convenience function for creating a SASL transport factory.
dataset/ETHPy150Open pycassa/pycassa/pycassa/connection.py/make_sasl_transport_factory