Created
August 16, 2012 18:19
-
-
Save alq666/3372347 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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