How to use ipyvue - 3 common examples

To help you get started, we’ve selected a few ipyvue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glue-viz / glue-jupyter / glue_jupyter / app.py View on Github external
from glue.core.command import ApplySubsetState
from glue.core.edit_subset_mode import (NewMode, ReplaceMode, AndMode, OrMode,
                                        XorMode, AndNotMode)

from glue_jupyter.utils import _update_not_none, validate_data_argument
from glue_jupyter.widgets.subset_select_vuetify import SubsetSelect
from glue_jupyter.widgets.subset_mode_vuetify import SelectionModeMenu

__all__ = ['JupyterApplication']

# TODO: move this to glue-core so that the subset mode can be set ot a string
# there too
SUBSET_MODES = {'new': NewMode, 'replace': ReplaceMode, 'and': AndMode,
                'or': OrMode, 'xor': XorMode, 'not': AndNotMode}

ipyvue.register_component_from_file(
    None, 'glue-float-field', os.path.join(os.path.dirname(__file__), 'widgets',
                                           'glue_float_field.vue'))


class JupyterApplication(Application):
    """
    The main Glue application object for the Jupyter environment.

    This is used as the primary way to interact with glue, including loading
    data, creating viewers, and adding links.

    Parameters
    ----------
    data_collection : `~glue.core.data_collection.DataCollection`
        A pre-existing data collection. By default, a new data collection is
        created.
github mariobuikhuizen / ipyvuetify / ipyvuetify / Html.py View on Github external
# This subclass is needed to use VuetifyView instead of VueView so CSS workarounds for Vuetify are
# added in the frontend.

from traitlets import Unicode
from ipyvue import Html as VueHtml
from ._version import semver


class Html(VueHtml):

    _model_name = Unicode('HtmlModel').tag(sync=True)

    _view_name = Unicode('VuetifyView').tag(sync=True)

    _view_module = Unicode('jupyter-vuetify').tag(sync=True)

    _model_module = Unicode('jupyter-vuetify').tag(sync=True)

    _view_module_version = Unicode(semver).tag(sync=True)

    _model_module_version = Unicode(semver).tag(sync=True)


__all__ = ['Html']
github mariobuikhuizen / ipyvuetify / ipyvuetify / VuetifyTemplate.py View on Github external
# This subclass is needed to use VuetifyView instead of VueView so CSS workarounds for Vuetify are
# added in the frontend.

from traitlets import Unicode
from ipyvue import VueTemplate
from ._version import semver


class VuetifyTemplate(VueTemplate):

    _model_name = Unicode('VuetifyTemplateModel').tag(sync=True)

    _view_name = Unicode('VuetifyView').tag(sync=True)

    _view_module = Unicode('jupyter-vuetify').tag(sync=True)

    _model_module = Unicode('jupyter-vuetify').tag(sync=True)

    _view_module_version = Unicode(semver).tag(sync=True)

    _model_module_version = Unicode(semver).tag(sync=True)


__all__ = ['VuetifyTemplate']

ipyvue

Jupyter widgets base for Vue libraries

MIT
Latest version published 3 days ago

Package Health Score

70 / 100
Full package analysis

Similar packages