The Datadog Python library
Project description
The Datadog Python library
===========================
[![Build Status](https://travis-ci.org/DataDog/datadogpy.svg?branch=master)](https://travis-ci.org/DataDog/datadogpy)
[![Documentation Status](https://readthedocs.org/projects/datadogpy/badge/?version=latest)](https://readthedocs.org/projects/datadogpy/?badge=latest)
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 the Agent's StatsD metrics aggregation server, to interact with Datadog and efficiently report events and metrics.
For usage of StatsD metrics, the Agent must be [running and available](https://docs.datadoghq.com/developers/dogstatsd/).
- Library Documentation: http://datadogpy.readthedocs.org/en/latest/
- HTTP API Documentation: http://docs.datadoghq.com/api/
- DatadogHQ: http://datadoghq.com
See [CHANGELOG.md](CHANGELOG.md) for changes.
Installation
------------
To install from pip:
pip install datadog
To install from source:
python setup.py install
Quick Start Guide
-----------------
```python
# Configure the module according to your needs
from datadog import initialize
options = {
'api_key':'api_key',
'app_key':'app_key'
}
initialize(**options)
# Use Datadog REST API client
from datadog import api
title = "Something big happened!"
text = 'And let me tell you all about it here!'
tags = ['version:1', 'application:web']
api.Event.create(title=title, text=text, tags=tags)
# Use Statsd, a Python client for DogStatsd
from datadog import statsd
statsd.increment('whatever')
statsd.gauge('foo', 42)
# Or ThreadStats, an alternative tool to collect and flush metrics, using Datadog REST API
from datadog import ThreadStats
stats = ThreadStats()
stats.start()
stats.increment('home.page.hits')
```
Thread Safety
-------------
`DogStatsD` and `ThreadStats` are thread-safe.
===========================
[![Build Status](https://travis-ci.org/DataDog/datadogpy.svg?branch=master)](https://travis-ci.org/DataDog/datadogpy)
[![Documentation Status](https://readthedocs.org/projects/datadogpy/badge/?version=latest)](https://readthedocs.org/projects/datadogpy/?badge=latest)
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 the Agent's StatsD metrics aggregation server, to interact with Datadog and efficiently report events and metrics.
For usage of StatsD metrics, the Agent must be [running and available](https://docs.datadoghq.com/developers/dogstatsd/).
- Library Documentation: http://datadogpy.readthedocs.org/en/latest/
- HTTP API Documentation: http://docs.datadoghq.com/api/
- DatadogHQ: http://datadoghq.com
See [CHANGELOG.md](CHANGELOG.md) for changes.
Installation
------------
To install from pip:
pip install datadog
To install from source:
python setup.py install
Quick Start Guide
-----------------
```python
# Configure the module according to your needs
from datadog import initialize
options = {
'api_key':'api_key',
'app_key':'app_key'
}
initialize(**options)
# Use Datadog REST API client
from datadog import api
title = "Something big happened!"
text = 'And let me tell you all about it here!'
tags = ['version:1', 'application:web']
api.Event.create(title=title, text=text, tags=tags)
# Use Statsd, a Python client for DogStatsd
from datadog import statsd
statsd.increment('whatever')
statsd.gauge('foo', 42)
# Or ThreadStats, an alternative tool to collect and flush metrics, using Datadog REST API
from datadog import ThreadStats
stats = ThreadStats()
stats.start()
stats.increment('home.page.hits')
```
Thread Safety
-------------
`DogStatsD` and `ThreadStats` are thread-safe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
datadog-0.26.0.tar.gz
(154.5 kB
view details)
File details
Details for the file datadog-0.26.0.tar.gz
.
File metadata
- Download URL: datadog-0.26.0.tar.gz
- Upload date:
- Size: 154.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/2.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbaa6b4b2b88fd552605e6730f60d5437017bb76d6b701432eaafbc983735b79 |
|
MD5 | 1d7fd7063e4d8450737a047e374c4c5d |
|
BLAKE2b-256 | 17dda7bbb33427f853f82b36356286fb922ef976bf18e78dbb76ac43b8c50e26 |