@jupyterlite

***`

@jupyterlite / @jupyterlite/session / LiteSessionClient

Class: LiteSessionClient#

Defined in: client.ts:20

A class to handle requests to /api/sessions

Implements#

  • ISessionAPIClient

Constructors#

Constructor#

**new LiteSessionClient**(options): LiteSessionClient

Defined in: client.ts:26

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.ts:69

The server settings for the session client.

Returns#

ISettings

Implementation of#

ISessionAPIClient.serverSettings

Methods#

getModel()#

**getModel**(id): Promise<IModel>

Defined in: client.ts:78

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.ts:89

List the running sessions

Returns#

Promise<IModel[]>

Implementation of#

ISessionAPIClient.listRunning

***`

shutdown()#

**shutdown**(id): Promise<void>

Defined in: client.ts:195

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.ts:210

Shut down all sessions.

Returns#

Promise<void>

***`

startNew()#

**startNew**(options): Promise<IModel>

Defined in: client.ts:153

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.ts:102

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