@jupyterlite


@jupyterlite / @jupyterlite/session / LiteSessionClient

Class: LiteSessionClient#

Defined in: client.d.ts:11

A class to handle requests to /api/sessions

Implements#

  • ISessionAPIClient

Constructors#

Constructor#

new LiteSessionClient(options): LiteSessionClient

Defined in: client.d.ts:17

Construct a new LiteSessionClient.

Parameters#

options#

IOptions

The instantiation options for a LiteSessionClient.

Returns#

LiteSessionClient

Accessors#

serverSettings#

Get Signature#

get serverSettings(): ISettings

Defined in: client.d.ts:21

The server settings for the session client.

Returns#

ISettings

Implementation of#

ISessionAPIClient.serverSettings

Methods#

getModel()#

getModel(id): Promise<IModel>

Defined in: client.d.ts:27

Get a session by id.

Parameters#

id#

string

The id of the session.

Returns#

Promise<IModel>

Implementation of#

ISessionAPIClient.getModel


listRunning()#

listRunning(): Promise<IModel[]>

Defined in: client.d.ts:31

List the running sessions

Returns#

Promise<IModel[]>

Implementation of#

ISessionAPIClient.listRunning


shutdown()#

shutdown(id): Promise<void>

Defined in: client.d.ts:54

Shut down a session.

Parameters#

id#

string

The id of the session to shut down.

Returns#

Promise<void>

Implementation of#

ISessionAPIClient.shutdown


shutdownAll()#

shutdownAll(): Promise<void>

Defined in: client.d.ts:58

Shut down all sessions.

Returns#

Promise<void>


startNew()#

startNew(options): Promise<IModel>

Defined in: client.d.ts:48

Start a new session TODO: read path and name

Parameters#

options#

ISessionOptions

The options to start a new session.

Returns#

Promise<IModel>

Implementation of#

ISessionAPIClient.startNew


update()#

update(options): Promise<IModel>

Defined in: client.d.ts:41

Patch an existing session. This can be used to rename a session.

  • path updates session to track renamed paths

  • kernel.name starts a new kernel with a given kernelspec

Parameters#

options#

DeepPartial<IModel>

The options to patch the session.

Returns#

Promise<IModel>

Implementation of#

ISessionAPIClient.update