dt
Dynatrace API Python client
What it is and what it does
dt is a Python wrapper around the Dynatrace REST API designed to make programmatic access to Dynatrace monitoring data straightforward. It provides typed interfaces to query entities, retrieve metrics, manage API tokens, configure settings, and interact with ActiveGates and other infrastructure components. The client handles common HTTP concerns like retries, rate-limit backoff, and custom timeouts, and includes bindings for both Environment API V2 and V1 endpoints.
The package is intended for developers who need to automate Dynatrace operations, extract monitoring data for external analysis, or build workflows. It abstracts away raw HTTP details and provides Python objects with sensible defaults, making it practical for quick scripts and integration work. The implementation covers most major Dynatrace APIs, though some endpoints remain partially implemented or unimplemented.
Use it for:
- Query host metrics and entity properties to build custom dashboards or export monitoring data for analysis.
- Automate API token lifecycle management, including creation, rotation, and cleanup of unused tokens.
- Retrieve and manage Dynatrace settings, anomaly detection rules, and credential vault entries programmatically.
- Monitor ActiveGate status and configuration across your Dynatrace infrastructure.
- Extract problem and event data for integration with external incident management or alerting systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client for the Dynatrace REST API with type hints and a focus on ease of use for exploring the API and writing quick scripts.
Yes, if you are actively using Dynatrace and need programmatic access to its APIs. The package has low install friction, permissive licensing, and no known vulnerabilities. However, note the aging maintenance status (288 days since last release) — verify that its API coverage and compatibility align with your Dynatrace version before committing to it for production automation.
Install
dt on PyPI
pip
pip install dtuv
uv add dtpoetry
poetry add dtInstalling dt
Before you install
Low install friction with a single runtime dependency (requests). Last commit was 2025-10-30 and the project shows aging maintenance status with 288 days since the latest release, though it remains unarchived and has 70 repository stars.
License in practice
Licensed under Apache Software License (permissive), which permits commercial and private use with minimal restrictions.
Quickstart
pip install dt
from dt import Dynatrace
dt = Dynatrace("environment_url", "api_token")
for entity in dt.entities.list('type("HOST")', fields="properties.memoryTotal"):
print(entity.entity_id, entity.display_name)
Requires a valid Dynatrace environment URL and API token to authenticate with the REST API.
Verify before relying
- Whether the aging maintenance status (288 days since latest release) affects API compatibility with recent Dynatrace versions.
- Coverage level for newer Dynatrace API endpoints not listed in the implementation progress table.
- Whether the package's type hints and ease-of-use claims are validated for all supported Python versions (3.6 through 3.14).
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | aging — 288 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 90,661/month — #13,569 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dt-1.2.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
oneagent-sdkExtends Dynatrace monitoring into Python…
permissive · top 15,000 on PyPI
autodynatraceAutodynatrace wraps the Dynatrace OneAgent SDK…
permissive · top 15,000 on PyPI
prelude-python-sdkProvides a typed Python client for the Prelude…
permissive · top 5,000 on PyPI
prometheus-api-clientConnects to Prometheus monitoring systems and…
permissive · top 5,000 on PyPI
glean-api-clientA Python SDK for accessing Glean's REST API,…
unclear · top 15,000 on PyPI
datadogProvides a Python client library to send…
permissive · top 1,000 on PyPI
appdynamicsA Python agent that instruments and monitors…
unclear · top 15,000 on PyPI
signalfxPython client library for sending metrics,…
permissive · top 15,000 on PyPI
pysignalclirestapiPython client library for the Signal Cli REST…
permissive · top 15,000 on PyPI
prometheus-clientInstruments Python applications to expose…
permissive · top 1,000 on PyPI