Grid View Spec¶
grid-view-spec describes dashboard pages as a tree of blocks: tables, filters, KPIs, charts,
actions, and layout areas. The Python package grid_view_spec validates specs, renders HTML, and
exposes export hooks. Host applications supply rows and business logic; the spec describes
structure only.
The PyPI distribution is grid-view-spec. The Python package imports as grid_view_spec.
What you build¶
from grid_view_spec import GridViewSpec, validate_spec
from grid_view_spec.render import render_grid_view_spec
spec = GridViewSpec(id="orders", blocks=(...), layout=...)
validate_spec(spec)
html = render_grid_view_spec(spec, rows, host=host)
One loader boots the page: {% grid_view_spec_assets part='js' force_core=True %} → GridView.bootScope().
KPI and chart numbers always come from Python rows — never from untrusted spec input.
Documentation map¶
| Group | Start here |
|---|---|
| Install and first page | Getting started |
| Concepts | Architecture overview |
| Spec contract | GridViewSpec |
| Blocks | Block catalog |
| Tables | Tables overview |
| Filtering | Filter semantics |
| Visualization | KPI and charts |
| Integration | Django |
| Export | Page pattern |
| Tools | MCP server |
| Reference | Python types |
Backends¶
| Backend | Use when |
|---|---|
| Django | Templates, GridPreference, export views |
| Jinja2 / Starlette / FastAPI | Headless HTML hosts |
| Wire / MCP | JSON storage, IDE validation |
Optional extras¶
| Extra | Purpose |
|---|---|
[pdf] |
WeasyPrint PDF export |
[mcp] |
gridviewspec-mcp CLI |
[starlette] / [fastapi] |
ASGI routes |
Links¶
- PyPI
- GitHub
- Changelog
- Architecture reference (maintainers)