Skip to main content

dogonnet 🐶

Tests Lint codecov PyPI version Python 3.10+ License: MIT

A Datadog dashboard templating library using Jsonnet - because good dashboards deserve good tools!

Overview

dogonnet is a Python library that provides a Jsonnet-based templating system for creating Datadog dashboards programmatically. Think of it as grafonnet-lib for Datadog.

Features

  • Jsonnet Templates: Write dashboards as code using Jsonnet
  • 38 Widget Types: 100% coverage of all Datadog dashboard widgets
  • Reusable Components: Pre-built widgets and layouts for common patterns
  • Type-Safe: Pydantic models for dashboard definitions
  • CLI Tools: Push, fetch, export, and manage dashboards
  • Rich Presets: Opinionated defaults for beautiful dashboards
  • AI-Friendly: Comprehensive guides for LLM agents to create dashboards from natural language

AI Agent Support 🤖

dogonnet is designed to be easily used by AI agents like Claude, ChatGPT, and others. We provide:

  • Agent Guide - Comprehensive guide for AI agents with metric-to-widget mapping, decision trees, and templates
  • Cookbook - Copy-paste recipes for common dashboard patterns (Golden Signals, RED metrics, business KPIs)
  • Progressive Disclosure - Simple one-liners to complex configurations
  • Semantic Documentation - Every widget has usage examples and common patterns

Example AI prompts that work:

  • "Create a golden signals dashboard for my payment-api service"
  • "Make a business dashboard with revenue, signups, and conversion rate"
  • "Show me CPU and memory trends for my infrastructure"

Installation

pip install dogonnet

Quick Start

Create a Dashboard with Jsonnet

local dogonnet = import 'dogonnet/lib/main.libsonnet';

dogonnet.dashboard.new(
  title='My Service Dashboard',
  tags=['service:my-service'],
)
.addRow(
  dogonnet.row.new(title='Key Metrics')
  .addPanel(
    dogonnet.widgets.timeseries(
      title='Request Rate',
      queries=['avg:http.requests{service:my-service}']
    )
  )
  .addPanel(
    dogonnet.widgets.timeseries(
      title='Error Rate',
      queries=['avg:http.errors{service:my-service}']
    )
  )
)

Push to Datadog

# Compile and push
dogonnet push my-dashboard.jsonnet

# Export without pushing
dogonnet compile my-dashboard.jsonnet > output.json

# Fetch existing dashboard
dogonnet fetch my-dashboard-id > existing.json

Library Structure

  • dogonnet.lib.widgets - Widget builders (timeseries, query_value, heatmap, etc.)
  • dogonnet.lib.layouts - Layout utilities (rows, columns, grid)
  • dogonnet.lib.presets - Opinionated presets for common patterns
  • dogonnet.client - Datadog API client
  • dogonnet.cli - Command-line tools

Documentation

See docs/ for detailed documentation:

For AI Agents & Users:

For Developers:

Examples

Check out examples/ for sample dashboards:

Development

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run linter
ruff check .

# Format code
ruff format .

License

MIT

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

Acknowledgments

Inspired by grafonnet-lib for Grafana.

Metadata

Release files for dogonnet 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dogonnet 0.1.1
File Size Uploaded Provenance Actions
dogonnet-0.1.1.tar.gz 52.9 kB Without provenance Details for dogonnet-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dogonnet 0.1.1
File Interpreter ABI Platform Actions
dogonnet-0.1.1-py3-none-any.whl Python 3 none any Details for dogonnet-0.1.1-py3-none-any.whl

Total release size: 80.6 kB

Release files / dogonnet-0.1.1.tar.gz

Download URL dogonnet-0.1.1.tar.gz
Size 52.9 kB
Tags Source
SHA-256 checksum
How to use checksums
46902a86f46373789ad54fcc8c0333377ca6b7b6be53c0bac074c2408b96fa13
BLAKE2b-256 checksum
How to use checksums
286321f82ee31448bdf6dec70aa90092ca8ad3e634d9bb9929e48c25b75da07e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / dogonnet-0.1.1-py3-none-any.whl

Download URL dogonnet-0.1.1-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a2469a9d03f4985286df5a6c600414b49baa43a7628692301ba1435dcccdcb5
BLAKE2b-256 checksum
How to use checksums
a9e86b0aace979d70664026aee1b551ab97527af3f67fc5f8df3eb5b64de4939
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for dogonnet 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page