@classmethod
    def query(cls, **params):
        # Set the right endpoint
        cls._class_url = cls._METRIC_QUERY_ENDPOINT

        # `from` is a reserved keyword in Python, therefore
        # `api.Metric.query(from=...)` is not permited
        # -> map `start` to `from` and `end` to `to`
        try:
            params['from'] = params.pop('start')
            params['to'] = params.pop('end')
        except KeyError as e:
            raise ApiError("The parameter '{0}' is required".format(e.args[0]))

        return super(Metric, cls)._search(**params)
Query metrics from Datadog
dataset/ETHPy150Open DataDog/datadogpy/datadog/api/metrics.py/Metric.query