{"id":24807,"library":"vegafusion-python-embed","title":"VegaFusion Python Embed","description":"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.","status":"active","version":"1.6.9","language":"python","source_language":"en","source_url":"https://github.com/vegafusion/vegafusion","tags":["vega","visualization","rust","embed","data-transformation"],"install":[{"cmd":"pip install vegafusion-python-embed","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"vegafusion itself is a namespace package; the embed module is accessed via 'vegafusion.runtime'","wrong":"import vegafusion","symbol":"runtime","correct":"from vegafusion import runtime"}],"quickstart":{"code":"from vegafusion import runtime\nimport vegafusion as vf\n# Example: evaluate a simple Vega expression\nresult = runtime.eval_expression(\"2 + 3\")\nprint(result)\n# Note: runtime functions are synchronous in the embed package.","lang":"python","description":"Import the runtime and evaluate a Vega expression. The embed package bundles the Rust core and is designed for server-side or offline use."},"warnings":[{"fix":"Choose one: install vegafusion for client-side use (with WASM), or vegafusion-python-embed for server-side / embedding.","message":"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.","severity":"gotcha","affected_versions":"all"},{"fix":"Use vegafusion-client or vegafusion-wasm for client-side spec transformations. For the embed package, stick to expression evaluation and data transformation.","message":"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.","severity":"deprecated","affected_versions":">=1.4.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install vegafusion-python-embed","cause":"Installed the wrong package or forgot to install vegafusion-python-embed (vegafusion alone does not include runtime module).","error":"ModuleNotFoundError: No module named 'vegafusion.runtime'"},{"fix":"Use: from vegafusion import runtime; result = runtime.eval_expression(...)","cause":"Attempting to import directly from the top-level vegafusion namespace, which does not export those functions.","error":"ImportError: cannot import name 'eval_expression' from 'vegafusion'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}