DataDog/datadogpy

Name: datadogpy

Owner: Datadog, Inc.

Description: The Datadog Python library

Created: 2015-01-27 23:39:37.0

Updated: 2018-01-16 00:26:19.0

Pushed: 2017-12-20 09:57:02.0

Homepage: https://datadoghq.com/

Size: 624

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

The Datadog Python library

Build Status Documentation Status

Datadogpy is a collection of tools suitable for inclusion in existing Python projects or for development of standalone scripts. It provides an abstraction on top of Datadog's raw HTTP interface and agent's StatsD metrics aggregation server, to interact with Datadog and efficiently report events and metrics.

See CHANGELOG.md for changes.

Installation

To install from pip:

pip install datadog

To install from source:

python setup.py install
Quick Start Guide
nfigure the module according to your needs
 datadog import initialize

ons = {
'api_key':'api_key',
'app_key':'app_key'


ialize(**options)

e Datadog REST API client
 datadog import api

e = "Something big happened!"
 = 'And let me tell you all about it here!'
 = ['version:1', 'application:web']

Event.create(title=title, text=text, tags=tags)


e Statsd, a Python client for DogStatsd
 datadog import statsd

sd.increment('whatever')
sd.gauge('foo', 42)

 ThreadStats, an alternative tool to collect and flush metrics, using Datadog REST API
 datadog import ThreadStats
s = ThreadStats()
s.start()
s.increment('home.page.hits')
Threadsafety

DogStatsd and ThreadStats are threadsafe.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.