VegaFusion Python Embed
raw JSON → 1.6.9 verified Fri May 01 auth: no python
VegaFusion Python Embed provides Rust-accelerated Vega expression evaluation and data transformations for use with Vega(-Lite) visualizations. Version 1.6.9 is the latest stable release. The package is maintained by the VegaFusion team and released as needed.
pip install vegafusion-python-embed Common errors
error ModuleNotFoundError: No module named 'vegafusion.runtime' ↓
cause Installed the wrong package or forgot to install vegafusion-python-embed (vegafusion alone does not include runtime module).
fix
Run: pip install vegafusion-python-embed
error ImportError: cannot import name 'eval_expression' from 'vegafusion' ↓
cause Attempting to import directly from the top-level vegafusion namespace, which does not export those functions.
fix
Use: from vegafusion import runtime; result = runtime.eval_expression(...)
Warnings
gotcha vegafusion-python-embed is a separate package from vegafusion. It bundles the Rust runtime and is intended for embedding in other Python tools. Do not install both vegafusion and vegafusion-python-embed together; they conflict. ↓
fix Choose one: install vegafusion for client-side use (with WASM), or vegafusion-python-embed for server-side / embedding.
deprecated Some runtime functions (e.g., runtime.pre_transform_spec) that were available in earlier versions are now moved to vegafusion-wasm or vegafusion-client packages. Check if you are using deprecated API. ↓
fix Use vegafusion-client or vegafusion-wasm for client-side spec transformations. For the embed package, stick to expression evaluation and data transformation.
Imports
- runtime wrong
import vegafusioncorrectfrom vegafusion import runtime
Quickstart
from vegafusion import runtime
import vegafusion as vf
# Example: evaluate a simple Vega expression
result = runtime.eval_expression("2 + 3")
print(result)
# Note: runtime functions are synchronous in the embed package.