Documentation ¶
Overview ¶
Package resources defines Golang representations for all of the resources defined by the Jupyter Swagger API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kernel ¶
type Kernel struct { ID string `json:"id,omitempty"` SpecID string `json:"name"` LastActivity string `json:"last_activity,omitempty"` Connections int `json:"connections"` ExecutionState string `json:"execution_state,omitempty"` // The `env` field is not part of the documented API, but is set by the notebook // server when calling into gateway servers. See here: // https://github.com/jupyter/notebook/blob/2cfff07a39fa486a3f05c26b400fa26e1802a053/notebook/gateway/managers.py#L408 Env map[string]any `json:"env,omitempty"` // This `metadata` field is not part of the Jupyter API. It is added as an extension for reporting // additional metadata. Metadata map[string]any `json:"metadata,omitempty"` // contains filtered or unexported fields }
Kernel defines a running process for executing code inside of a Jupyter server.
func (Kernel) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*Kernel) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
type KernelSpec ¶
type KernelSpec struct { ID string `json:"name"` Spec *Spec `json:"spec"` Resources map[string]string `json:"resources"` // contains filtered or unexported fields }
KernelSpec defines one of the available kernel configurations supported by a Jupyter server.
func (*KernelSpec) Identify ¶
func (ks *KernelSpec) Identify() string
Identify returns the ID of the kernelspec.
func (KernelSpec) MarshalJSON ¶
func (ks KernelSpec) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*KernelSpec) UnmarshalJSON ¶
func (ks *KernelSpec) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type KernelSpecs ¶
type KernelSpecs struct { Default string `json:"default"` KernelSpecs map[string]*KernelSpec `json:"kernelspecs"` // contains filtered or unexported fields }
KernelSpecs represents the collection of kernel specs returned by a kernel spec list call.
func (KernelSpecs) MarshalJSON ¶
func (ks KernelSpecs) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface
func (*KernelSpecs) UnmarshalJSON ¶
func (ks *KernelSpecs) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unmarshaler interface
type Session ¶
type Session struct { ID string `json:"id"` Path string `json:"path"` Name string `json:"name"` Type string `json:"type"` Kernel *Kernel `json:"kernel"` Notebook map[string]string `json:"notebook,omitempty"` // contains filtered or unexported fields }
Session defines a mapping between a file path and a kernel.
func (Session) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*Session) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
type Spec ¶
type Spec struct { Language string `json:"language"` Argv []string `json:"argv"` DisplayName string `json:"display_name"` CodemirrorMode string `json:"codemirror_mode,omitempty"` Env map[string]string `json:"env"` HelpLinks map[string]string `json:"help_links,omitempty"` Metadata map[string]any `json:"metadata"` InterruptMode string `json:"interrupt_mode,omitempty"` }
Spec defines the `spec` field nested within a KernelSpec
type Terminal ¶
type Terminal struct { ID string `json:"name"` // contains filtered or unexported fields }
Terminal defines an interactive terminal running inside of a Jupyter server.
func (Terminal) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*Terminal) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface