Skip to content

Instantly share code, notes, and snippets.

@alq666
Created August 16, 2012 18:19
Show Gist options
  • Save alq666/3372347 to your computer and use it in GitHub Desktop.
Save alq666/3372347 to your computer and use it in GitHub Desktop.
# standard imports for this example
import os
import time
from datetime import datetime as dt
from datetime import timedelta as delta
import math
# import the simple dog client
from dogapi import dog_http_api as dog
# give dog your credentials (we're using os.environ to let you experiment via environment variables)
# in this example we're only reporting data, so we only need an API key
# see: https://github.com/DataDog/dogapi/wiki/Authentication for more on API authentication
dog.api_key = os.environ.get("DATADOG_API_KEY")
# send an event too
dog.event("API Testing", """Testing done\n%%%\n*[FTW](https://github.com)*\n%%%""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment