from datadog import initialize, api
import time

options = {
    'api_key': 'api_key',
    'app_key': 'app_key'
}

initialize(**options)

# Take a graph snapshot
end = int(time.time())
start = end - (60 * 60)
api.Graph.create(metric_query="system.load.1", start=start, end=end)

from datadog import initialize, api
import time

options = {
    'api_key': 'api_key',
    'app_key': 'app_key'
}

initialize(**options)

# Take a graph snapshot
end = int(time.time())
start = end - (60 * 60)
api.Graph.create(metric_query="system.load.1{*}", start=start, end=end)

add missing scope to python snapshot snippet