</> Python
from the dropdown in the </> Query Editor
panel to access our Python Editor Console.requests
library is readily available and pre-imported for HTTP requests.client_id
which should be a string representing the client identifier.metric_filters
allows for the filtering of data based on various criteria. The structure of metric_filters
is defined as follows:metric_filters
variable can include filters of types STRING
, DATE
, and NUMBER
, uniquely identified by a filter name:
startDate
and endDate
, both of datetime.date
type.secrets
dictionary. This allows secure storage and retrieval of sensitive data such as API keys or database credentials. You can set up your secrets in the Home Page → Settings Tab → Secrets.
result
variable. This variable should be an array of objects (or a list of dictionaries in Python terms):