grafanalib
Library for building Grafana dashboards
Decision gist · record as of 2026-08-14
Yes, if you need to version-control and template Grafana dashboards. The low install friction, permissive license, and established community make it a solid choice for infrastructure-as-code workflows. However, be aware that maintenance is aging—last release was over a year ago and maintainers have reduced availability. Check that the library supports your Grafana version and required dashboard features before committing to it in a production pipeline.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a single runtime dependency (attrs).
- Maintenance status is aging—last release was over a year ago and maintainers note reduced availability, though the repository remains active and the project has moderate community adoption.
License · maintenance · safety
Apache (permissive) — Apache License (permissive) places no restrictions on use, modification, or distribution for commercial or private projects.
last release 2024-01-12 (945 days) · last repo commit 2025-12-08 · 1,971 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 393,287 downloads/mo, #6,999 on PyPI
Alternatives
Verify before relying
pip install grafanalib
from grafanalib.core import Dashboard, Row, Graph
dash = Dashboard(title="My Dashboard", rows=[Row(panels=[...])])
generate-dashboard -o dashboard.json example.dashboard.py- Whether the library supports all current Grafana dashboard features and API versions
- Maintenance timeline and whether critical bugs or Grafana compatibility issues are addressed promptly
- Python 3.12+ support status (classifiers list up to 3.11)
What it is and what it does
grafanalib is a Python library that generates Grafana dashboard JSON from code, letting you define monitoring dashboards as Python objects instead of through Grafana's UI. It depends only on attrs and installs as a pure Python wheel with low friction. The library is designed for teams that want to version-control dashboards, reuse common patterns across multiple dashboards, and automate dashboard creation as part of infrastructure-as-code workflows.
The package is in alpha status and has been maintained since 2016, though recent activity has slowed—the last release was over a year ago and the maintainers acknowledge reduced availability. It supports Python 3.7 through 3.11 and works by letting you write Python scripts that describe dashboard structure, then using the generate-dashboard command to output JSON ready for Grafana provisioning.
Use it for
- Version-control Grafana dashboards in Git alongside infrastructure code and application monitoring definitions
- Build reusable dashboard templates and patterns to standardize monitoring across multiple services or teams
- Automate dashboard creation in CI/CD pipelines when spinning up new environments or services
- Reduce repetition by factoring out common graph, alert, and panel configurations into Python functions
- Generate dashboards programmatically from metrics metadata or service inventory
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to version-control and template Grafana dashboards.
The low install friction, permissive license, and established community make it a solid choice for infrastructure-as-code workflows. However, be aware that maintenance is aging—last release was over a year ago and maintainers have reduced availability. Check that the library supports your Grafana version and required dashboard features before committing to it in a production pipeline.
Install
grafanalib on PyPI
Before you install
Low install friction with a single runtime dependency (attrs). Maintenance status is aging—last release was over a year ago and maintainers note reduced availability, though the repository remains active and the project has moderate community adoption.
License in practice
Apache License (permissive) places no restrictions on use, modification, or distribution for commercial or private projects.
Quickstart
pip install grafanalib
from grafanalib.core import Dashboard, Row, Graph
dash = Dashboard(title="My Dashboard", rows=[Row(panels=[...])])
generate-dashboard -o dashboard.json example.dashboard.py
Verify before relying
- Whether the library supports all current Grafana dashboard features and API versions
- Maintenance timeline and whether critical bugs or Grafana compatibility issues are addressed promptly
- Python 3.12+ support status (classifiers list up to 3.11)
Package facts
| License | Apache permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageattrs |
| Maintenance | Aging 945 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 393,287 / month, #6,999 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: Monitoring |
Evidence: grafanalib-0.7.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “version control dashboards”
- grafanalibGenerates Grafana dashboards from Python code, letting you…
- azure-mgmt-authorizationManages Azure role-based access control, role assignments, and…
- scc-firewall-manager-sdkProvides a Python SDK for interacting with Cisco Security Cloud…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also grafana-foundation-sdk · grafana-client · mcp-grafana · pulumiverse-grafana · mypy-boto3-grafana · python-logging-loki · google-cloud-monitoring-dashboards · dash-daq · wandb-workspaces · locust-plugins