Class: Sessions#
@jupyterlite/session.Sessions
A class to handle requests to /api/sessions
Implements#
Constructors#
constructor#
new Sessions(options)
Construct a new Sessions.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
The instantiation options for a Sessions. |
Defined in#
Properties#
_kernels#
Private_kernels:IKernels
Defined in#
_sessions#
Private_sessions:IModel[] =[]
Defined in#
Methods#
get#
get(id):Promise<IModel>
Get a session by id.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The id of the session. |
Returns#
Promise<IModel>
Implementation of#
ISessions.get
Defined in#
list#
list():Promise<IModel[]>
List the running sessions
Returns#
Promise<IModel[]>
Implementation of#
ISessions.list
Defined in#
patch#
patch(options):Promise<IModel>
Path 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#
Name |
Type |
Description |
|---|---|---|
|
|
The options to patch the session. |
Returns#
Promise<IModel>
Implementation of#
ISessions.patch
Defined in#
shutdown#
shutdown(id):Promise<void>
Shut down a session.
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The id of the session to shut down. |
Returns#
Promise<void>
Implementation of#
ISessions.shutdown
Defined in#
startNew#
startNew(options):Promise<IModel>
Start a new session TODO: read path and name
Parameters#
Name |
Type |
Description |
|---|---|---|
|
|
The options to start a new session. |
Returns#
Promise<IModel>
Implementation of#
ISessions.startNew