ipyvue

1.12.0 · active · verified Wed Apr 15

ipyvue is a Python library that provides a Jupyter widget base for building interactive applications using Vue.js. It allows developers to create custom Jupyter widgets with Vue.js templates and data reactivity. The library is actively maintained with frequent minor releases addressing bug fixes and introducing new features, currently at version 1.12.0.

Warnings

Install

Imports

Quickstart

This example defines a simple Jupyter widget using `ipyvue.VueTemplate`. It renders a 'Hello, [name]!' message and an input field to update the 'name' data property reactively. The `template` property holds the Vue.js template, and `data` provides initial reactive properties.

from ipyvue import VueTemplate
from IPython.display import display

class HelloWorld(VueTemplate):
    template = """
        <template>
            <div>Hello, {{ name }}!</div>
            <input v-model="name" placeholder="Enter your name">
        </template>
    """
    data = {
        'name': 'World'
    }

widget = HelloWorld()
display(widget)
# In a Jupyter notebook/Lab cell, 'widget' on the last line
# would implicitly display it without 'display()'.

view raw JSON →