thebe-core / Exports / ThebeNotebook
Table of contents¶
Constructors¶
Properties¶
Accessors¶
Methods¶
- attachSession
- clear
- detachSession
- executeAll
- executeCells
- executeOnly
- executeUpTo
- findCells
- getCell
- getCellById
- lastCell
- numCells
- updateParameters
- waitForKernel
- fromCodeBlocks
- fromIpynb
Constructors¶
constructor¶
• new ThebeNotebook(id, config, rendermime?)
Parameters¶
| Name | Type |
|---|---|
id | string |
config | Config |
rendermime? | IRenderMimeRegistry |
Defined in¶
packages/core/src/notebook.ts:33
Properties¶
cells¶
• cells: IThebeCell[]
Defined in¶
packages/core/src/notebook.ts:28
events¶
• Protected events: EventEmitter
Defined in¶
packages/core/src/notebook.ts:31
id¶
• Readonly id: string
Defined in¶
packages/core/src/notebook.ts:26
metadata¶
• metadata: INotebookMetadata
Defined in¶
packages/core/src/notebook.ts:29
rendermime¶
• Readonly rendermime: IRenderMimeRegistry
Defined in¶
packages/core/src/notebook.ts:27
session¶
• Optional session: ThebeSession
Defined in¶
packages/core/src/notebook.ts:30
Accessors¶
last¶
• get last(): IThebeCell
Returns¶
Defined in¶
packages/core/src/notebook.ts:79
parameters¶
• get parameters(): undefined | IThebeCell[]
Returns¶
undefined | IThebeCell[]
Defined in¶
packages/core/src/notebook.ts:68
widgets¶
• get widgets(): IThebeCell[]
Returns¶
Defined in¶
packages/core/src/notebook.ts:75
Methods¶
attachSession¶
▸ attachSession(session): void
Parameters¶
| Name | Type |
|---|---|
session | ThebeSession |
Returns¶
void
Defined in¶
packages/core/src/notebook.ts:122
clear¶
▸ clear(): void
Returns¶
void
Defined in¶
packages/core/src/notebook.ts:145
detachSession¶
▸ detachSession(): void
Returns¶
void
Defined in¶
packages/core/src/notebook.ts:135
executeAll¶
▸ executeAll(stopOnError?, preprocessor?): Promise<(null | ExecuteReturn)[]>
Parameters¶
| Name | Type | Default value |
|---|---|---|
stopOnError | boolean | false |
preprocessor? | (s: string) => string | undefined |
Returns¶
Promise<(null | ExecuteReturn)[]>
Defined in¶
packages/core/src/notebook.ts:238
executeCells¶
▸ executeCells(cellIds, stopOnError?, preprocessor?): Promise<(null | ExecuteReturn)[]>
Parameters¶
| Name | Type | Default value |
|---|---|---|
cellIds | string[] | undefined |
stopOnError | boolean | false |
preprocessor? | (s: string) => string | undefined |
Returns¶
Promise<(null | ExecuteReturn)[]>
Defined in¶
packages/core/src/notebook.ts:195
executeOnly¶
▸ executeOnly(cellId, preprocessor?): Promise<null | ExecuteReturn>
Parameters¶
| Name | Type |
|---|---|
cellId | string |
preprocessor? | (s: string) => string |
Returns¶
Promise<null | ExecuteReturn>
Defined in¶
packages/core/src/notebook.ts:177
executeUpTo¶
▸ executeUpTo(cellId, stopOnError?, preprocessor?): Promise<(null | ExecuteReturn)[]>
Parameters¶
| Name | Type | Default value |
|---|---|---|
cellId | string | undefined |
stopOnError | boolean | false |
preprocessor? | (s: string) => string | undefined |
Returns¶
Promise<(null | ExecuteReturn)[]>
Defined in¶
packages/core/src/notebook.ts:149
findCells¶
▸ findCells(tag): undefined | IThebeCell[]
Parameters¶
| Name | Type |
|---|---|
tag | string |
Returns¶
undefined | IThebeCell[]
Defined in¶
packages/core/src/notebook.ts:88
getCell¶
▸ getCell(idx): IThebeCell
Parameters¶
| Name | Type |
|---|---|
idx | number |
Returns¶
Defined in¶
packages/core/src/notebook.ts:93
getCellById¶
▸ getCellById(id): undefined | IThebeCell
Parameters¶
| Name | Type |
|---|---|
id | string |
Returns¶
undefined | IThebeCell
Defined in¶
packages/core/src/notebook.ts:100
lastCell¶
▸ lastCell(): IThebeCell
Returns¶
Defined in¶
packages/core/src/notebook.ts:105
numCells¶
▸ numCells(): number
Returns¶
number
Defined in¶
packages/core/src/notebook.ts:84
updateParameters¶
▸ updateParameters(newSource, interpolate?): void
Parameters¶
| Name | Type | Default value |
|---|---|---|
newSource | string | undefined |
interpolate | boolean | false |
Returns¶
void
Defined in¶
packages/core/src/notebook.ts:110
waitForKernel¶
▸ waitForKernel(kernel): Promise<ThebeSession>
Parameters¶
| Name | Type |
|---|---|
kernel | Promise<ThebeSession> |
Returns¶
Promise<ThebeSession>
Defined in¶
packages/core/src/notebook.ts:115
fromCodeBlocks¶
▸ Static fromCodeBlocks(blocks, config): ThebeNotebook
Parameters¶
| Name | Type |
|---|---|
blocks | CodeBlock[] |
config | Config |
Returns¶
Defined in¶
packages/core/src/notebook.ts:41
fromIpynb¶
▸ Static fromIpynb(ipynb, config, rendermime?): ThebeNotebook
Parameters¶
| Name | Type |
|---|---|
ipynb | INotebookContent |
config | Config |
rendermime? | IRenderMimeRegistry |