Registry / data / vegafusion

vegafusion

JSON →
library2.0.3pypypiunverified

VegaFusion provides server-side acceleration for the Vega visualization grammar, primarily designed to enhance Python libraries like Altair. It enables scaling interactive charts to large datasets by offloading data transformations from the browser to an efficient, multi-threaded Rust-based Python kernel. The library is currently at version 2.0.3 and maintains an active development and release cadence.

pip install vegafusion altair
INSTALL
IMPORT
SIG · VEGAFUSION
V
vegafusion
datapythonv2.0.3
Install
4.2s avg
Import
96ms
Disk
112MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.3 · 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
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 4.2s · import 0.096s · 113MB
112MB installed
● package 112MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vegafusion
import vegafusion as vf
Standard import for the VegaFusion library.
enable/save/transformed_data (for Altair)
import altair as alt alt.data_transformers.enable('vegafusion')
import vegafusion as vf; vf.enable()
As of VegaFusion 2.0, Altair integration logic has been upstreamed. Use Altair's data transformers directly. `vf.save()` and `vf.transformed_data()` are also removed in favor of Altair's native methods when the transformer is enabled.

This quickstart demonstrates how to enable VegaFusion for Altair visualizations. As of VegaFusion 2.0, the integration is handled by enabling Altair's built-in 'vegafusion' data transformer. This allows Altair charts to automatically offload data-intensive operations to the VegaFusion backend.

import altair as alt from vega_datasets import data # Enable the VegaFusion data transformer within Altair alt.data_transformers.enable('vegafusion') # Example Altair chart that benefits from VegaFusion's server-side processing source = data.flights.url chart = alt.Chart(source).mark_bar().encode( x=alt.X('distance:Q', bin=True), y='count()' ).properties(title='Flight Distance Histogram (Accelerated by VegaFusion)') # To display the chart in a Jupyter environment: chart # To save the chart with transformed data (using Altair's native save method): # chart.save('flight_histogram.json')
vegafusion --version
Debug
Known issues
breakingVegaFusion 2.0 removed the `vegafusion-jupyter` package and direct Altair integration methods (like `vf.enable()`, `vf.save()`, `vf.transformed_data()`) from the `vegafusion` package. These functionalities are now handled directly by Altair's built-in 'vegafusion' data transformer.
fix
Instead of `import vegafusion as vf; vf.enable()`, use `import altair as alt; alt.data_transformers.enable('vegafusion')`. For saving or extracting transformed data, use Altair's native `chart.save()` or `chart.to_dict()` methods after enabling the transformer.
affects: >=2.0.0
breakingVegaFusion 2.0 requires Altair version 5.5.0 or higher for full compatibility. Older Altair versions may not work or exhibit unexpected behavior.
fix
Ensure Altair is updated to `altair>=5.5.0` using `pip install altair>=5.5.0`.
affects: >=2.0.0
breakingVegaFusion 2.0 significantly reduced its Python dependencies. `pyarrow` and `pandas` are no longer required, instead relying on `narwhals` for DataFrame compatibility and `arrow3-core` for Arrow data. Existing code heavily dependent on `pyarrow` or `pandas` might need adjustments if not explicitly installed alongside.
fix
Review your data handling. If you require `pandas` or `pyarrow` for other parts of your workflow, ensure they are still installed. VegaFusion 2.0 supports any Narwhals-compatible DataFrame type or objects supporting the Arrow PyCapsule interface for zero-copy data transfer.
affects: >=2.0.0
gotchaWhen working in cloud notebook environments, VegaFusion's local timezone might differ from the browser's. This can lead to discrepancies in date/time-based visualizations or transformations.
fix
Customize VegaFusion's local timezone using `vegafusion.set_local_tz("Your/Timezone")` at the beginning of your session to ensure consistent time interpretation.
affects: All
Upgrade
Version history
2.0.3latest on PyPI · released Sep 29, 2025
Audit
Dependencies
pythonrequiredRequired for the Python package.
altairrequiredCommonly used with VegaFusion for visualization; requires specific version for compatibility with VegaFusion 2.x.
narwhalsrequiredVegaFusion 2.0+ uses Narwhals as a general interface to DataFrames, reducing direct dependencies on pandas/pyarrow.
arrow3-corerequiredCore dependency for Arrow data handling in VegaFusion 2.0+.
packagingrequiredDependency for packaging utilities in VegaFusion 2.0+.
Agent activity
46 hits · last 30 days
node
42
OpenAI (training)
1
Resources
vegafusion — pip install vegafusion · libregistry