def ingest(self, token, endpoint=None, timeout=None, compress=None):
        """Obtain a datapoint and event ingest client."""
        from . import ingest
        if ingest.sf_pbuf:
            client = ingest.ProtoBufSignalFxIngestClient
        else:
            _logger.warn('Protocol Buffers not installed properly; '
                         'falling back to JSON.')
            client = ingest.JsonSignalFxIngestClient
        compress = compress if compress is not None else self._compress
        return client(
            token=token,
            endpoint=endpoint or self._ingest_endpoint,
            timeout=timeout or self._timeout,
            compress=compress)
def ingest ( self , token , endpoint = None , timeout = None , compress = None ) : from . import ingest if ingest . sf_pbuf : client = ingest . ProtoBufSignalFxIngestClient else : _logger . warn ( 'Protocol Buffers not installed properly; ' 'falling back to JSON.' ) client = ingest . JsonSignalFxIngestClient compress = compress if compress is not None else self . _compress return client ( token = token , endpoint = endpoint or self . _ingest_endpoint , timeout = timeout or self . _timeout , compress = compress )
Obtain a datapoint and event ingest client.