Datadogpy is a Python client library that provides an abstraction over Datadog's HTTP API and DogStatsD metrics aggregation server for reporting events and metrics to Datadog.
The library solves the problem of integrating Datadog monitoring into Python applications by wrapping raw HTTP calls and StatsD operations with a higher-level interface. It supports two main approaches: direct HTTP API calls for querying and managing Datadog resources, and DogStatsD for efficient client-side metrics aggregation before sending to the Datadog Agent. The library can be configured via function parameters or environment variables, with fallback support for APM-related environment variable prefixes. It supports both UDP and Unix Domain Socket connections for DogStatsD, and includes origin detection capabilities to automatically tag metrics with pod information when running in containerized environments.
Developers should choose this library when building Python applications that need to send metrics and events to Datadog, particularly for projects already using the Datadog Agent. The library suits both standalone scripts and integration into existing Python codebases. For comprehensive API endpoint coverage, the README notes that a generated library called datadog-api-client-python is available as an alternative that exposes all Datadog HTTP endpoints.
The project maintains active development with regular updates documented in its changelog. The library provides extensive configuration flexibility through environment variables, allowing developers to adapt it to different deployment scenarios without code changes. Documentation is available both in the repository and through external Datadog API documentation with working code examples.