Schema-first visualization specifications for LLMs
Project description
Vizdantic
Vizdantic is a schema-first visualization layer for LLMs.
It allows language models to describe what to visualize using structured, validated specifications, while developers remain in full control of how charts are rendered.
Why Vizdantic?
LLMs are good at describing intent, but unreliable at writing plotting code.
They often:
- hallucinate APIs
- mix incompatible chart parameters
- produce brittle, unvalidated code
Vizdantic solves this by separating responsibilities:
LLMs choose visualization intent. Developers choose the plotting library.
What Vizdantic Does
- Provides Pydantic schemas for common visualization types
- Validates LLM-generated visualization intent
- Is library-agnostic by design
- Renders charts via optional plugins (e.g. Plotly)
Vizdantic does not replace plotting libraries. It sits between LLMs and visualization backends.
Quick Start
Install
pip install vizdantic
Validate LLM output
Render with Plotly Example
Using Vizdantic with LLMs
Vizdantic works with any LLM and supports two common integration patterns .
| Prompt-based (Universal) | Tool / Function Calling (Structured) |
|---|---|
| Use when your LLM doesnot support tools or function calling. | Use when your LLMsupports JSON schema tools(OpenAI, Anthropic, etc.). |
| You embed the schema directly in the prompt. | You pass the schema as a tool input contract. |
Prompt-based integration
Example model output:
Tool / function calling integration
The LLM is now constrained to valid Vizdantic output only .
Validate and Render
Once the LLM returns JSON, the workflow is the same:
Custom Styling and Branding
Vizdantic does not control styling.
It intentionally avoids:
- colors
- themes
- fonts
- layout decisions
Vizdantic only defines visualization intent. All styling remains fully under user control.
This makes it safe to use in production environments with strict brand or design requirements.
Example: Company styling (Evil Corp)
from vizdantic.plugins.plotly import render
def evil_corp_theme(fig):
fig.update_layout(
template="plotly_dark",
colorway=["#ff0000", "#000000"],
font=dict(family="Inter"),
)
return fig
fig = render(spec, df)
fig = evil_corp_theme(fig)
fig.show()
The LLM decides what to visualize. Your code decides how it looks.
Vizdantic never overrides user-defined styling.
How It Works
- An LLM produces structured visualization intent (JSON)
- Vizdantic validates it using Pydantic
- A plugin translates the spec into a concrete chart
The schema is stable and backend-agnostic.
Rendering is handled entirely by plugins.
Plugins
Currently supported:
- Plotly (
vizdantic.plugins.plotly)
Planned:
- Matplotlib
- Altair
- Vega-Lite
Each plugin exposes a simple:
function.
Status
- Version: 0.1.0
- Stability: Experimental
- Breaking changes: Possible until 1.0
Vizdantic is under active development and feedback is welcome.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vizdantic-0.1.2.tar.gz.
File metadata
- Download URL: vizdantic-0.1.2.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eeefb610b80b17c1c4ea0449e5eb0943f2485605b011fbb7fa907739ad790ec
|
|
| MD5 |
6a1f8aa7cddaa464d283826cb18a54c3
|
|
| BLAKE2b-256 |
868596dd57e3272ce481cb64046147d44807fd6c332589204b72481126a9bf77
|
Provenance
The following attestation bundles were made for vizdantic-0.1.2.tar.gz:
Publisher:
release.yaml on ivogarais/vizdantic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdantic-0.1.2.tar.gz -
Subject digest:
4eeefb610b80b17c1c4ea0449e5eb0943f2485605b011fbb7fa907739ad790ec - Sigstore transparency entry: 775793382
- Sigstore integration time:
-
Permalink:
ivogarais/vizdantic@6d180f05314cfd28150f8197350b733f9db76631 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ivogarais
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6d180f05314cfd28150f8197350b733f9db76631 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vizdantic-0.1.2-py3-none-any.whl.
File metadata
- Download URL: vizdantic-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c978bd7682e222b4a394882ea40a5ec0c6003c0c34d436b36f87d4b1adce9a8d
|
|
| MD5 |
7e57cf097ee3ea86eb0f2325568afbb4
|
|
| BLAKE2b-256 |
99eaf3d5ea9347694aff04c9bea41ed866d6ca0410567ee4c4d132d96ebcbf30
|
Provenance
The following attestation bundles were made for vizdantic-0.1.2-py3-none-any.whl:
Publisher:
release.yaml on ivogarais/vizdantic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdantic-0.1.2-py3-none-any.whl -
Subject digest:
c978bd7682e222b4a394882ea40a5ec0c6003c0c34d436b36f87d4b1adce9a8d - Sigstore transparency entry: 775793384
- Sigstore integration time:
-
Permalink:
ivogarais/vizdantic@6d180f05314cfd28150f8197350b733f9db76631 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ivogarais
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@6d180f05314cfd28150f8197350b733f9db76631 -
Trigger Event:
push
-
Statement type: