0.0.17 • Published 2 years ago

aiffel-jupyter-kernel v0.0.17

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

aiffel-jupyter-kernel

Get Started

Installation

$ yarn add aiffel-jupyter-kernel

Connect to jupyter

const connector = new KernelConnector()
connector.connect({
    baseUrl: 'http://127.0.0.1:8888', // Jupyter url
    token: 'token' // Jupyter token
})

Execute code

const response = connector.requestExecute({
    code: value || '',
    allow_stdin: true,
    silent: false,
    stop_on_error: true,
    store_history: true,
})

Render execution response

<CodeExecuteResponse response={response} />

KernelConnector hook

type Props = {
    connector: KernelConnector
}

/*
This component will be rendered when the KernelConnector's runningStatus or connectionState changes.
*/
export default function Something({ connector }: Props) {
    const { runningStatus, connectionState } = useKernelConnector(connector)
    ...
}

Debug window

  1. add DEBUG_JUPYTER_KERNEL to localStorage
  2. render <DebugWindow kernelConnector={connector}/>

When develop this package

scripts

$ yarn watch
$ cd ./example
$ yarn start

Reference

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago