or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

core-application.mdextension-integration.mdfrontend-plugins.mdindex.mdweb-handlers.md

index.mddocs/

0

# Jupyter Notebook

1

2

Jupyter Notebook is a web-based interactive computing environment that enables users to create and share documents containing live code, equations, visualizations, and narrative text. Built on JupyterLab components for the frontend and Jupyter Server for the Python backend, it represents the next generation of the classic IPython notebook interface.

3

4

## Package Information

5

6

- **Package Name**: notebook

7

- **Language**: Python (with TypeScript/JavaScript frontend components)

8

- **Installation**: `pip install notebook`

9

10

## Core Imports

11

12

```python

13

import notebook

14

```

15

16

For accessing the main application class:

17

18

```python

19

from notebook.app import JupyterNotebookApp, main, launch_new_instance

20

```

21

22

For version information:

23

24

```python

25

from notebook import __version__, version_info

26

```

27

28

For CLI entry point (usually not needed in user code):

29

30

```python

31

from notebook.__main__ import main as cli_main

32

```

33

34

## Basic Usage

35

36

### Starting the Notebook Server

37

38

```python

39

from notebook.app import JupyterNotebookApp

40

41

# Launch notebook server programmatically

42

app = JupyterNotebookApp()

43

app.initialize()

44

app.start()

45

```

46

47

Command line usage:

48

49

```bash

50

# Start notebook server

51

jupyter notebook

52

53

# Start with specific configuration

54

jupyter notebook --port=8888 --no-browser --ip=0.0.0.0

55

```

56

57

### Server Extension Integration

58

59

```python

60

# Jupyter server extension registration

61

from notebook import _jupyter_server_extension_paths, _jupyter_server_extension_points

62

63

# Get extension paths

64

paths = _jupyter_server_extension_paths()

65

# Returns: [{"module": "notebook"}]

66

67

# Get extension entry points

68

points = _jupyter_server_extension_points()

69

# Returns: [{"module": "notebook", "app": JupyterNotebookApp}]

70

```

71

72

## Architecture

73

74

Jupyter Notebook v7 is built on a modern architecture:

75

76

- **Backend**: Jupyter Server provides the Python web server, file management, and kernel orchestration

77

- **Frontend**: JupyterLab components deliver the web interface using React and TypeScript

78

- **Extension System**: JupyterLab extension architecture allows customization and plugins

79

- **Handlers**: Tornado web handlers manage HTTP requests for different notebook interfaces (tree view, notebook editor, console, terminal)

80

81

The package bridges classic notebook workflows with modern JupyterLab technology, maintaining backward compatibility while providing enhanced functionality and extensibility.

82

83

## Capabilities

84

85

### Core Application

86

87

The main server application class and configuration system that manages the Jupyter Notebook server, handles web requests, and integrates with the Jupyter ecosystem.

88

89

```python { .api }

90

class JupyterNotebookApp:

91

name: str = "notebook"

92

app_name: str = "Jupyter Notebook"

93

description: str

94

version: str

95

extension_url: str = "/"

96

default_url: str = "/tree"

97

expose_app_in_browser: bool

98

custom_css: bool

99

100

def server_extension_is_enabled(self, extension: str) -> bool: ...

101

def initialize_handlers(self) -> None: ...

102

def initialize(self, argv: list[str] | None = None) -> None: ...

103

@classmethod

104

def launch_instance(cls, argv: list[str] | None = None) -> None: ...

105

```

106

107

[Core Application](./core-application.md)

108

109

### Web Request Handlers

110

111

HTTP request handlers that serve the notebook interface, including the file browser, notebook editor, console, terminal, and file editor interfaces.

112

113

```python { .api }

114

class NotebookBaseHandler:

115

def get_page_config(self) -> dict[str, Any]: ...

116

117

class TreeHandler(NotebookBaseHandler):

118

async def get(self, path: str = "") -> None: ...

119

120

class NotebookHandler(NotebookBaseHandler):

121

async def get(self, path: str = "") -> Any: ...

122

123

class ConsoleHandler(NotebookBaseHandler):

124

def get(self, path: str | None = None) -> Any: ...

125

126

class TerminalHandler(NotebookBaseHandler):

127

def get(self, path: str | None = None) -> Any: ...

128

```

129

130

[Web Handlers](./web-handlers.md)

131

132

### Extension System Integration

133

134

Jupyter server and lab extension hooks that enable the notebook to integrate with the broader Jupyter ecosystem and be discovered by other Jupyter applications.

135

136

```python { .api }

137

def _jupyter_server_extension_paths() -> list[dict[str, str]]: ...

138

def _jupyter_server_extension_points() -> list[dict[str, Any]]: ...

139

def _jupyter_labextension_paths() -> list[dict[str, str]]: ...

140

```

141

142

[Extension Integration](./extension-integration.md)

143

144

### Frontend Plugin System

145

146

JupyterLab frontend extensions that provide notebook-specific functionality including checkpoint indicators, kernel status, output scrolling, and UI enhancements.

147

148

```typescript { .api }

149

// Plugin interfaces

150

interface INotebookShell { ... }

151

interface INotebookPathOpener {

152

open(options: INotebookPathOpener.IOpenOptions): WindowProxy | null;

153

}

154

155

// Main plugins exported

156

const plugins: JupyterFrontEndPlugin<any>[];

157

```

158

159

[Frontend Plugins](./frontend-plugins.md)

160

161

## Types

162

163

```python { .api }

164

# Version information

165

VersionInfo = namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"])

166

167

# Application entry points

168

def main() -> None: ...

169

def launch_new_instance() -> None: ...

170

171

# Entry point functions

172

def main() -> None: ...

173

def launch_new_instance() -> None: ...

174

175

# Constants

176

__version__: str

177

version_info: VersionInfo

178

```