Jupyter
Create interactive notebooks and execute code cells. Useful for data analysis, visualization, and educational purposes.
Eg Deno.jupyter
Functions
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.
Interfaces
Namespaces
Variables
function Deno.jupyter.broadcast
#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 #
Return Type #
Promise<void> function Deno.jupyter.display
#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 - Display options with a default { raw: true }
Return Type #
Promise<void> function Deno.jupyter.format
#format(obj: unknown): Promise<MediaBundle>Format an object for displaying in Deno
Parameters #
#obj: unknown - The object to be displayed
Return Type #
Promise<MediaBundle> Promise
function Deno.jupyter.html
#html(strings: TemplateStringsArray,...values: unknown[],): Displayablefunction Deno.jupyter.image
Overload 1
#image(path: string): DisplayableOverload 2
#image(data: Uint8Array): Displayablefunction Deno.jupyter.md
#md(strings: TemplateStringsArray,...values: unknown[],): DisplayableShow 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 
* TypeScript ${Deno.version.typescript}
* V8 ${Deno.version.v8}
* Deno ${Deno.version.deno}
Interactive compute with Jupyter _built into Deno_!
`
Parameters #
Return Type #
function Deno.jupyter.svg
#svg(strings: TemplateStringsArray,...values: unknown[],): DisplayableSVG 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 #
Return Type #
interface Deno.jupyter.Displayable
Properties #
#[$display]: () => MediaBundle | Promise<MediaBundle> interface Deno.jupyter.DisplayOptions
interface Deno.jupyter.MediaBundle
A collection of supported media types and data for Jupyter frontends.
Index Signatures #
Properties #
#text/plain: string #image/svg+xml: string #text/markdown: string #application/javascript: string #image/jpeg: string #application/pdf: string #application/json: object #application/geo+json: object #application/vdom.v1+json: object #application/vnd.plotly.v1+json: object #application/vnd.vega.v5+json: VegaObject #application/vnd.vegalite.v4+json: VegaObject #application/vnd.vegalite.v5+json: VegaObject namespace Deno.jupyter
A namespace containing runtime APIs available in Jupyter notebooks.
When accessed outside of Jupyter notebook context an error will be thrown.
Functions #
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.