thebe-core / Exports / ThebeServer
Implements¶
Table of contents¶
Constructors¶
Properties¶
Accessors¶
Methods¶
- _makeBinderUrl
- checkForSavedBinderSession
- clearSavedBinderSessions
- connectToExistingSession
- connectToJupyterLiteServer
- connectToJupyterServer
- connectToServerViaBinder
- createDirectory
- dispose
- duplicateFile
- getContents
- getFetchUrl
- getKernelSpecs
- listRunningSessions
- refreshRunningSessions
- renameContents
- shutdownAllSessions
- shutdownSession
- startNewSession
- uploadFile
- status
Constructors¶
constructor¶
• new ThebeServer(config
)
Parameters¶
Name | Type |
---|---|
config | Config |
Defined in¶
packages/core/src/server.ts:42
Properties¶
_isDisposed¶
• Private
_isDisposed: boolean
Defined in¶
packages/core/src/server.ts:39
config¶
• Readonly
config: Config
Defined in¶
packages/core/src/server.ts:34
events¶
• Private
events: EventEmitter
Defined in¶
packages/core/src/server.ts:40
id¶
• Readonly
id: string
Defined in¶
packages/core/src/server.ts:33
ready¶
• Readonly
ready: Promise
<ThebeServer
>
Implementation of¶
Defined in¶
packages/core/src/server.ts:35
resolveReadyFn¶
• Private
Optional
resolveReadyFn: (value
: ThebeServer
| PromiseLike
<ThebeServer
>) => void
Type declaration¶
▸ (value
): void
Parameters¶
Name | Type |
---|---|
value | ThebeServer | PromiseLike <ThebeServer > |
Returns¶
void
Defined in¶
packages/core/src/server.ts:38
serviceManager¶
• Optional
serviceManager: ServiceManager
Defined in¶
packages/core/src/server.ts:37
sessionManager¶
• Optional
sessionManager: SessionManager
Defined in¶
packages/core/src/server.ts:36
Accessors¶
isDisposed¶
• get
isDisposed(): boolean
Returns¶
boolean
Defined in¶
packages/core/src/server.ts:56
isReady¶
• get
isReady(): boolean
Returns¶
boolean
Implementation of¶
Defined in¶
packages/core/src/server.ts:52
settings¶
• get
settings(): undefined
| ISettings
Returns¶
undefined
| ISettings
Implementation of¶
Defined in¶
packages/core/src/server.ts:60
Methods¶
_makeBinderUrl¶
▸ _makeBinderUrl(): string
Returns¶
string
Defined in¶
packages/core/src/server.ts:232
checkForSavedBinderSession¶
▸ checkForSavedBinderSession(): Promise
<null
| SavedSessionInfo
>
Returns¶
Promise
<null
| SavedSessionInfo
>
Defined in¶
packages/core/src/server.ts:249
clearSavedBinderSessions¶
▸ clearSavedBinderSessions(): Promise
<void
>
Returns¶
Promise
<void
>
Defined in¶
packages/core/src/server.ts:129
connectToExistingSession¶
▸ connectToExistingSession(model
): Promise
<ThebeSession
>
Parameters¶
Name | Type |
---|---|
model | IModel |
Returns¶
Promise
<ThebeSession
>
Defined in¶
packages/core/src/server.ts:118
connectToJupyterLiteServer¶
▸ connectToJupyterLiteServer(): Promise
<void
>
Connect to Jupyterlite Server
Returns¶
Promise
<void
>
Defined in¶
packages/core/src/server.ts:193
connectToJupyterServer¶
▸ connectToJupyterServer(): Promise
<void
>
Connect to a Jupyter server directly
Returns¶
Promise
<void
>
Defined in¶
packages/core/src/server.ts:139
connectToServerViaBinder¶
▸ connectToServerViaBinder(): Promise
<void
>
Connect to a Binder instance in order to access a Jupyter server that can provide kernels
Returns¶
Promise
<void
>
Defined in¶
packages/core/src/server.ts:262
createDirectory¶
▸ createDirectory(opts
): Promise
<RestAPIContentsResponse
>
Parameters¶
Name | Type |
---|---|
opts | Object |
opts.path | string |
Returns¶
Promise
<RestAPIContentsResponse
>
Implementation of¶
ServerRestAPI.createDirectory
Defined in¶
packages/core/src/server.ts:466
dispose¶
▸ dispose(): void
Returns¶
void
Defined in¶
packages/core/src/server.ts:72
duplicateFile¶
▸ duplicateFile(opts
): Promise
<RestAPIContentsResponse
>
Parameters¶
Name | Type |
---|---|
opts | Object |
opts.copy_from | string |
opts.ext? | string |
opts.path | string |
opts.type? | "notebook" | "file" |
Returns¶
Promise
<RestAPIContentsResponse
>
Implementation of¶
ServerRestAPI.duplicateFile
Defined in¶
packages/core/src/server.ts:449
getContents¶
▸ getContents(opts
): Promise
<RestAPIContentsResponse
>
Parameters¶
Name | Type |
---|---|
opts | Object |
opts.format? | "text" | "base64" |
opts.path | string |
opts.returnContent? | boolean |
opts.type? | "notebook" | "file" | "directory" |
Returns¶
Promise
<RestAPIContentsResponse
>
Implementation of¶
ServerRestAPI.getContents
Defined in¶
packages/core/src/server.ts:436
getFetchUrl¶
▸ getFetchUrl(relativeUrl
): URL
Parameters¶
Name | Type |
---|---|
relativeUrl | string |
Returns¶
URL
Defined in¶
packages/core/src/server.ts:408
getKernelSpecs¶
▸ getKernelSpecs(): Promise
<ISpecModels
>
Returns¶
Promise
<ISpecModels
>
Implementation of¶
ServerRestAPI.getKernelSpecs
Defined in¶
packages/core/src/server.ts:428
listRunningSessions¶
▸ listRunningSessions(): Promise
<IModel
[]>
Returns¶
Promise
<IModel
[]>
Defined in¶
packages/core/src/server.ts:101
refreshRunningSessions¶
▸ refreshRunningSessions(): Promise
<IModel
[]>
Returns¶
Promise
<IModel
[]>
Defined in¶
packages/core/src/server.ts:112
renameContents¶
▸ renameContents(opts
): Promise
<RestAPIContentsResponse
>
Parameters¶
Name | Type |
---|---|
opts | Object |
opts.newPath | string |
opts.path | string |
Returns¶
Promise
<RestAPIContentsResponse
>
Implementation of¶
ServerRestAPI.renameContents
Defined in¶
packages/core/src/server.ts:477
shutdownAllSessions¶
▸ shutdownAllSessions(): Promise
<undefined
| void
>
Returns¶
Promise
<undefined
| void
>
Implementation of¶
ServerRuntime.shutdownAllSessions
Defined in¶
packages/core/src/server.ts:68
shutdownSession¶
▸ shutdownSession(id
): Promise
<undefined
| void
>
Parameters¶
Name | Type |
---|---|
id | string |
Returns¶
Promise
<undefined
| void
>
Implementation of¶
ServerRuntime.shutdownSession
Defined in¶
packages/core/src/server.ts:64
startNewSession¶
▸ startNewSession(kernelOptions?
): Promise
<null
| ThebeSession
>
Parameters¶
Name | Type |
---|---|
kernelOptions? | KernelOptions |
Returns¶
Promise
<null
| ThebeSession
>
Defined in¶
packages/core/src/server.ts:81
uploadFile¶
▸ uploadFile(opts
): Promise
<RestAPIContentsResponse
>
Parameters¶
Name | Type |
---|---|
opts | Object |
opts.content | string |
opts.format? | "text" | "base64" | "json" |
opts.path | string |
opts.type? | "notebook" | "file" |
Returns¶
Promise
<RestAPIContentsResponse
>
Implementation of¶
ServerRestAPI.uploadFile
Defined in¶
packages/core/src/server.ts:489
status¶
▸ Static
status(serverSettings
): Promise
<void
| Response
>
Parameters¶
Name | Type |
---|---|
serverSettings | Required <ServerSettings > |
Returns¶
Promise
<void
| Response
>