Install & Compatibility
Where this runs
tested against v1769699998!10.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Dashboard
✓ from grafana_foundation_sdk.models.dashboard import Dashboard
✗ from grafana_foundation_sdk import Dashboard
Top-level exports do not include models; must import from the specific submodule.
GrafanaDashboard
✓ from grafana_foundation_sdk.builders.dashboard import DashboardBuilder
✗ from grafana_foundation_sdk import GrafanaDashboard
The library uses builders, not a single class. Common mistake to look for a 'GrafanaDashboard' class.
Build a minimal dashboard with one panel and export as JSON.
from grafana_foundation_sdk.builders.dashboard import DashboardBuilder
from grafana_foundation_sdk.models.dashboard import Dashboard
builder = DashboardBuilder(
title="My Dashboard",
tags=["generated"]
)
panel = builder.add_panel(
title="CPU Usage",
type="timeseries",
datasource={"type": "prometheus", "uid": "prometheus_default"}
)
dashboard: Dashboard = builder.build()
print(dashboard.model_dump_json(indent=2))
Debug
Known issues
breakingThe SDK versioning uses a epoch-like timestamp prefix (e.g., 1769699998!10.1.0). This is non-standard and may break tools that parse version numbers like PEP 440. Pin to exact version.fixUse `pip install grafana-foundation-sdk==1769699998!10.1.0` to pin.
affects: All versions (e.g., 1769699998!10.1.0)
gotchaModels are not re-exported at the top-level `grafana_foundation_sdk` package. Attempting `from grafana_foundation_sdk import Dashboard` will fail with ImportError.fixImport from the correct submodule: `from grafana_foundation_sdk.models.dashboard import Dashboard`.
affects: All
deprecatedThe `grafana-foundation-sdk` package pre-10.0 used different model paths and builders. Version 10.0+ introduced a new model hierarchy and deprecated old imports like `grafana_foundation_sdk.schema`.fixMigrate imports to `grafana_foundation_sdk.models.*` and `grafana_foundation_sdk.builders.*`.
affects: <10.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'grafana_foundation_sdk'
Package not installed in current environment.
fixRun `pip install grafana-foundation-sdk` (note the hyphens in the package name).
ImportError: cannot import name 'Dashboard' from 'grafana_foundation_sdk'
Trying to import model from package root, but models are in submodules.
fixUse `from grafana_foundation_sdk.models.dashboard import Dashboard`.
TypeError: Panel() takes no arguments
Trying to create a panel by directly instantiating `Panel()` model class instead of using builder.
fixUse `DashboardBuilder().add_panel(...)` or the appropriate builder class.
Upgrade
Version history
1769699998!10.1.0latest on PyPI · released Jan 29, 2026
Audit
Dependencies
No dependency data recorded yet.