--- id: grafana-foundation-sdk version: "1769699998!10.1.0" license: unclear license_treatment: permissive maintenance: active --- # grafana-foundation-sdk — A set of tools, types and libraries for building and manipulating Grafana objects. License: permissive · Maintenance: active · Downloads: 356.0K/mo ## What it is and what it does The Grafana Foundation SDK is a Python library that provides generated types and builder classes for constructing Grafana objects—dashboards, panels, queries, and their configurations—in code rather than through the UI. It ships with support for all core Grafana datasources (Prometheus, Loki, etc.) and panel types, and can be extended with custom query and panel types for third-party plugins. The library is organized around a builder pattern: you chain method calls to configure objects, then call `.build()` to produce a JSON-serializable representation. It also supports unmarshaling: reading existing Grafana JSON and converting it back into typed Python objects. The types are generated from Grafana v10.1.x schemas, so the SDK is version-specific; other Grafana versions have separate branches in the repository. Use it for: - Generate Grafana dashboards programmatically from infrastructure definitions or monitoring requirements. - Build dashboard templates that can be instantiated with different parameters for different environments. - Parse and modify existing Grafana dashboards exported as JSON without manual editing. - Integrate Grafana dashboard creation into CI/CD pipelines or infrastructure-as-code workflows. - Define custom query types or panel options for private Grafana plugins. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python types, builders, and tools for programmatically constructing and manipulating Grafana dashboards, panels, queries, and related objects. Yes. The package is actively maintained, has no security vulnerabilities, installs with zero dependencies, and is permissively licensed. It is well-suited for anyone building Grafana dashboards programmatically or managing them as code. The main consideration is that it targets Grafana v10.1.x specifically; if you use a different Grafana version, you will need the corresponding SDK branch. ## Install pip install grafana-foundation-sdk uv add grafana-foundation-sdk poetry add grafana-foundation-sdk ## Installing grafana-foundation-sdk Before you install: Low install friction; pure Python wheel with no runtime dependencies. Actively maintained with recent commits and a stable release cadence. License in practice: Permissive license (Apache Software License) allows commercial and private use with minimal restrictions. Quickstart: pip install 'grafana_foundation_sdk==1769699998!10.1.0' from grafana_foundation_sdk.builders.dashboard import Dashboard from grafana_foundation_sdk.builders.timeseries import Panel as Timeseries from grafana_foundation_sdk.cog.encoder import JSONEncoder dashboard = Dashboard("My Dashboard").with_panel( Timeseries().title("Metric") ).build() print(JSONEncoder().encode(dashboard)) Requires Python 3.11 or later. Verify before relying: - Whether the generated types cover all Grafana v10.1.x panel and datasource types, or if custom extensions are often needed. - Performance characteristics when building or unmarshaling large dashboards with many panels and queries. - Compatibility guarantees when upgrading between Grafana versions or SDK releases. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 356.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags grafana dashboard builder python, grafana sdk python, programmatic grafana dashboard, grafana object types, grafana panel builder, grafana query builder, infrastructure as code grafana, infrastructure-as-code, grafana, builder-pattern [View on SkillFed](https://skillfed.io/packages/grafana-foundation-sdk) · [View on PyPI](https://pypi.org/project/grafana-foundation-sdk/)