nbformat

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Name string `json:"name"`
}

type Cell

type Cell struct {
	ID             string       `json:"id,omitempty"`
	CellType       string       `json:"cell_type"` // "code"
	Metadata       CellMetadata `json:"metadata"`
	Source         []string     `json:"source"`
	ExecutionCount *int         `json:"execution_count"`
	Outputs        []Output     `json:"outputs"`
}

type CellMetadata

type CellMetadata struct {
	Jupyter JupyterMetadata `json:"jupyter,omitempty"`
}

type JupyterMetadata

type JupyterMetadata struct {
	SourceHidden  bool `json:"source_hidden,omitempty"`
	OutputsHidden bool `json:"outputs_hidden,omitempty"`
}

type Kernelspec

type Kernelspec struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	Language    string `json:"language,omitempty"`
}

type LanguageInfo

type LanguageInfo struct {
	Name           string      `json:"name"`
	CodemirrorMode interface{} `json:"codemirror_mode,omitempty"` // Could be a string or an object
	FileExtension  string      `json:"file_extension,omitempty"`
	Mimetype       string      `json:"mimetype,omitempty"`
	PygmentsLexer  string      `json:"pygments_lexer,omitempty"`
}

type Metadata

type Metadata struct {
	Kernelspec   Kernelspec   `json:"kernelspec"`
	LanguageInfo LanguageInfo `json:"language_info"`
	OrigNbformat int          `json:"orig_nbformat,omitempty"`
	Title        string       `json:"title,omitempty"`
	Authors      []Author     `json:"authors,omitempty"`
}

type Notebook

type Notebook struct {
	Metadata      Metadata `json:"metadata"`
	NBFormatMinor int      `json:"nbformat_minor"`
	NBFormat      int      `json:"nbformat"`
	Cells         []Cell   `json:"cells"`
}

type Output

type Output struct {
	OutputType     string                 `json:"output_type"`
	Name           string                 `json:"name,omitempty"`
	Text           []string               `json:"text,omitempty"`
	ExceptionName  string                 `json:"ename,omitempty"`
	Exceptionvalue string                 `json:"evalue,omitempty"`
	Traceback      []string               `json:"traceback,omitempty"`
	Data           map[string]interface{} `json:"data,omitempty"`
	Metadata       map[string]interface{} `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL