thebe-core / Exports / ThebeServer

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ThebeServer(config)

Parameters

NameType
configConfig

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

ServerRuntime.ready

Defined in

packages/core/src/server.ts:35


resolveReadyFn

Private Optional resolveReadyFn: (value: ThebeServer | PromiseLike<ThebeServer>) => void

Type declaration

▸ (value): void

Parameters
NameType
valueThebeServer | 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

ServerRuntime.isReady

Defined in

packages/core/src/server.ts:52


settings

get settings(): undefined | ISettings

Returns

undefined | ISettings

Implementation of

ServerRuntime.settings

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

NameType
modelIModel

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

NameType
optsObject
opts.pathstring

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

NameType
optsObject
opts.copy_fromstring
opts.ext?string
opts.pathstring
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

NameType
optsObject
opts.format?"text" | "base64"
opts.pathstring
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

NameType
relativeUrlstring

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

NameType
optsObject
opts.newPathstring
opts.pathstring

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

NameType
idstring

Returns

Promise<undefined | void>

Implementation of

ServerRuntime.shutdownSession

Defined in

packages/core/src/server.ts:64


startNewSession

startNewSession(kernelOptions?): Promise<null | ThebeSession>

Parameters

NameType
kernelOptions?KernelOptions

Returns

Promise<null | ThebeSession>

Defined in

packages/core/src/server.ts:81


uploadFile

uploadFile(opts): Promise<RestAPIContentsResponse>

Parameters

NameType
optsObject
opts.contentstring
opts.format?"text" | "base64" | "json"
opts.pathstring
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

NameType
serverSettingsRequired<ServerSettings>

Returns

Promise<void | Response>

Defined in

packages/core/src/server.ts:420