Options
All
  • Public
  • Public/Protected
  • All
Menu

Module PageConfig

The namespace for Page Config functions.

Index

Functions

getBaseUrl

  • getBaseUrl(): string
  • Get the base url for a Jupyter application, or the base url of the page.

    Returns string

getNBConvertURL

  • getNBConvertURL(__namedParameters: object): string
  • Returns the URL converting this notebook to a certain format with nbconvert.

    Parameters

    • __namedParameters: object

    Returns string

getNotebookVersion

  • getNotebookVersion(): [number, number, number]
  • Get the Notebook version info [major, minor, patch].

    Returns [number, number, number]

getOption

  • getOption(name: string): string
  • Get global configuration data for the Jupyter application.

    Parameters

    • name: string

      The name of the configuration option.

    Returns string

    The config value or an empty string if not found.

    Notes

    All values are treated as strings. For browser based applications, it is assumed that the page HTML includes a script tag with the id jupyter-config-data containing the configuration as valid JSON. In order to support the classic Notebook, we fall back on checking for body data of the given name.

    For node applications, it is assumed that the process was launched with a --jupyter-config-data option pointing to a JSON settings file.

getToken

  • getToken(): string
  • Get the authorization token for a Jupyter application.

    Returns string

getTreeUrl

  • getTreeUrl(): string
  • Get the tree url for a JupyterLab application.

    Returns string

getWsUrl

  • getWsUrl(baseUrl?: string): string
  • Get the base websocket url for a Jupyter application, or an empty string.

    Parameters

    • Optional baseUrl: string

    Returns string

setOption

  • setOption(name: string, value: string): string
  • Set global configuration data for the Jupyter application.

    Parameters

    • name: string

      The name of the configuration option.

    • value: string

      The value to set the option to.

    Returns string

    The last config value or an empty string if it doesn't exist.

Generated using TypeDoc