How to use the jupyterlab.commands._AppHandler function in jupyterlab

To help you get started, we’ve selected a few jupyterlab 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 jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def unlink_package(package, app_dir=None, logger=None):
    """Unlink a package from JupyterLab by path or name.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.unlink_package(package)
github jupyterlab / jupyterlab / jupyterlab / handlers / extension_manager_handler.py View on Github external
def _ensure_compat_errors(info, app_dir, logger):
    """Ensure that the app info has compat_errors field"""
    handler = _AppHandler(app_dir, logger)
    info['compat_errors'] = handler._get_extension_compat()
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def link_package(path, app_dir=None, logger=None):
    """Link a package against the JupyterLab build."""
    handler = _AppHandler(app_dir, logger)
    return handler.link_package(path)
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def enable_extension(extension, app_dir=None, logger=None):
    """Enable a JupyterLab extension.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.toggle_extension(extension, False)
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def list_extensions(app_dir=None, logger=None):
    """List the extensions.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.list_extensions()
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def build_check(app_dir=None, logger=None):
    """Determine whether JupyterLab should be built.

    Returns a list of messages.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.build_check()
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def disable_extension(extension, app_dir=None, logger=None):
    """Disable a JupyterLab package.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.toggle_extension(extension, True)
github jupyterlab / jupyterlab / jupyterlab / handlers / extension_manager_handler.py View on Github external
def _build_check_info(app_dir, logger):
    """Get info about packages scheduled for (un)install/update"""
    handler = _AppHandler(app_dir, logger)
    messages = handler.build_check(fast=True)
    # Decode the messages into a dict:
    status = {'install': [], 'uninstall': [], 'update': []}
    for msg in messages:
        for key, pattern in _message_map.items():
            match = pattern.match(msg)
            if match:
                status[key].append(match.group('name'))
    return status
github jupyterlab / jupyterlab / jupyterlab / commands.py View on Github external
def get_app_info(app_dir=None, logger=None):
    """Get a dictionary of information about the app.
    """
    handler = _AppHandler(app_dir, logger)
    return handler.info