Skip to main content

Jupyter

Create interactive notebooks and execute code cells. Useful for data analysis, visualization, and educational purposes.

Eg Deno.jupyter

Functions

f
Deno.jupyter.broadcast

Broadcast a message on IO pub channel.

    f
    Deno.jupyter.display

    Display function for Jupyter Deno Kernel. Mimics the behavior of IPython's display(obj, raw=True) function to allow asynchronous displaying of objects in Jupyter.

      f
      Deno.jupyter.format

      Format an object for displaying in Deno

        f
        Deno.jupyter.html

        Show HTML in Jupyter frontends with a tagged template function.

          f
          Deno.jupyter.image

          Display a JPG or PNG image.

            f
            Deno.jupyter.md

            Show Markdown in Jupyter frontends with a tagged template function.

              f
              Deno.jupyter.svg

              SVG Tagged Template Function.

                Namespaces

                N
                Deno.jupyter

                A namespace containing runtime APIs available in Jupyter notebooks.

                  Variables

                  v
                  Deno.jupyter.$display
                  No documentation available

                    function Deno.jupyter.broadcast

                    unstable
                    #broadcast(
                    msgType: string,
                    content: Record<string, unknown>,
                    extra?: { metadata?: Record<string, unknown>; buffers?: Uint8Array[]; },
                    ): Promise<void>

                    Broadcast a message on IO pub channel.

                    await Deno.jupyter.broadcast("display_data", {
                      data: { "text/html": "<b>Processing.</b>" },
                      metadata: {},
                      transient: { display_id: "progress" }
                    });
                    
                    await new Promise((resolve) => setTimeout(resolve, 500));
                    
                    await Deno.jupyter.broadcast("update_display_data", {
                      data: { "text/html": "<b>Processing..</b>" },
                      metadata: {},
                      transient: { display_id: "progress" }
                    });
                    

                    Parameters #

                    #msgType: string
                    #content: Record<string, unknown>
                    #extra: { metadata?: Record<string, unknown>; buffers?: Uint8Array[]; }
                    optional

                    Return Type #

                    Promise<void>

                    function Deno.jupyter.display

                    unstable
                    #display(
                    obj: unknown,
                    options?: DisplayOptions,
                    ): Promise<void>

                    Display function for Jupyter Deno Kernel. Mimics the behavior of IPython's display(obj, raw=True) function to allow asynchronous displaying of objects in Jupyter.

                    Parameters #

                    #obj: unknown
                    • The object to be displayed
                    #options: DisplayOptions
                    optional
                    • Display options with a default { raw: true }

                    Return Type #

                    Promise<void>


                    function Deno.jupyter.html

                    unstable
                    #html(
                    strings: TemplateStringsArray,
                    ...values: unknown[],
                    ): Displayable

                    Show HTML in Jupyter frontends with a tagged template function.

                    Takes a template string and returns a displayable object for Jupyter frontends.

                    Examples #

                    #
                    const { html } = Deno.jupyter;
                    html`<h1>Hello, world!</h1>`
                    

                    Parameters #

                    #strings: TemplateStringsArray
                    #...values: unknown[]

                    Return Type #


                    function Deno.jupyter.image

                    unstable

                    Overload 1

                    #image(path: string): Displayable

                    Display a JPG or PNG image.

                    Deno.jupyter.image("./cat.jpg");
                    Deno.jupyter.image("./dog.png");
                    

                    Parameters #

                    #path: string

                    Return Type #

                    Overload 2

                    #image(data: Uint8Array): Displayable

                    Display a JPG or PNG image.

                    const img = Deno.readFileSync("./cat.jpg");
                    Deno.jupyter.image(img);
                    

                    Parameters #

                    #data: Uint8Array

                    Return Type #


                    function Deno.jupyter.md

                    unstable
                    #md(
                    strings: TemplateStringsArray,
                    ...values: unknown[],
                    ): Displayable

                    Show Markdown in Jupyter frontends with a tagged template function.

                    Takes a template string and returns a displayable object for Jupyter frontends.

                    Examples #

                    #
                    const { md } = Deno.jupyter;
                    md`# Notebooks in TypeScript via Deno ![Deno logo](https://github.com/denoland.png?size=32)
                    
                    * TypeScript ${Deno.version.typescript}
                    * V8 ${Deno.version.v8}
                    * Deno ${Deno.version.deno}
                    
                    Interactive compute with Jupyter _built into Deno_!
                    `
                    

                    Parameters #

                    #strings: TemplateStringsArray
                    #...values: unknown[]

                    Return Type #


                    function Deno.jupyter.svg

                    unstable
                    #svg(
                    strings: TemplateStringsArray,
                    ...values: unknown[],
                    ): Displayable

                    SVG Tagged Template Function.

                    Takes a template string and returns a displayable object for Jupyter frontends.

                    Example usage:

                    svg<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> </svg>

                    Parameters #

                    #strings: TemplateStringsArray
                    #...values: unknown[]

                    Return Type #




                    interface Deno.jupyter.MediaBundle

                    unstable

                    A collection of supported media types and data for Jupyter frontends.

                    Index Signatures #

                    #[key: string]:
                    string
                    | object
                    | undefined

                    Properties #

                    #text/plain: string
                    optional
                    #text/html: string
                    optional
                    #image/svg+xml: string
                    optional
                    #text/markdown: string
                    optional
                    #application/javascript: string
                    optional
                    #image/png: string
                    optional
                    #image/jpeg: string
                    optional
                    #image/gif: string
                    optional
                    #application/pdf: string
                    optional
                    #application/json: object
                    optional
                    #application/geo+json: object
                    optional
                    #application/vdom.v1+json: object
                    optional


                    namespace Deno.jupyter

                    unstable

                    A namespace containing runtime APIs available in Jupyter notebooks.

                    When accessed outside of Jupyter notebook context an error will be thrown.

                    Functions #

                    f
                    Deno.jupyter.broadcast

                    Broadcast a message on IO pub channel.

                      f
                      Deno.jupyter.display

                      Display function for Jupyter Deno Kernel. Mimics the behavior of IPython's display(obj, raw=True) function to allow asynchronous displaying of objects in Jupyter.

                        f
                        Deno.jupyter.format

                        Format an object for displaying in Deno

                          f
                          Deno.jupyter.html

                          Show HTML in Jupyter frontends with a tagged template function.

                            f
                            Deno.jupyter.image

                            Display a JPG or PNG image.

                              f
                              Deno.jupyter.md

                              Show Markdown in Jupyter frontends with a tagged template function.

                                f
                                Deno.jupyter.svg

                                SVG Tagged Template Function.

                                  Interfaces #

                                  Variables #

                                  v
                                  Deno.jupyter.$display
                                  No documentation available


                                    Did you find what you needed?

                                    Privacy policy