Jupyter Notebook - A web-based notebook environment for interactive computing
npx @tessl/cli install tessl/pypi-notebook@7.4.0Jupyter 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.
pip install notebookimport notebookFor accessing the main application class:
from notebook.app import JupyterNotebookApp, main, launch_new_instanceFor version information:
from notebook import __version__, version_infoFor CLI entry point (usually not needed in user code):
from notebook.__main__ import main as cli_mainfrom notebook.app import JupyterNotebookApp
# Launch notebook server programmatically
app = JupyterNotebookApp()
app.initialize()
app.start()Command line usage:
# Start notebook server
jupyter notebook
# Start with specific configuration
jupyter notebook --port=8888 --no-browser --ip=0.0.0.0# Jupyter server extension registration
from notebook import _jupyter_server_extension_paths, _jupyter_server_extension_points
# Get extension paths
paths = _jupyter_server_extension_paths()
# Returns: [{"module": "notebook"}]
# Get extension entry points
points = _jupyter_server_extension_points()
# Returns: [{"module": "notebook", "app": JupyterNotebookApp}]Jupyter Notebook v7 is built on a modern architecture:
The package bridges classic notebook workflows with modern JupyterLab technology, maintaining backward compatibility while providing enhanced functionality and extensibility.
The main server application class and configuration system that manages the Jupyter Notebook server, handles web requests, and integrates with the Jupyter ecosystem.
class JupyterNotebookApp:
name: str = "notebook"
app_name: str = "Jupyter Notebook"
description: str
version: str
extension_url: str = "/"
default_url: str = "/tree"
expose_app_in_browser: bool
custom_css: bool
def server_extension_is_enabled(self, extension: str) -> bool: ...
def initialize_handlers(self) -> None: ...
def initialize(self, argv: list[str] | None = None) -> None: ...
@classmethod
def launch_instance(cls, argv: list[str] | None = None) -> None: ...HTTP request handlers that serve the notebook interface, including the file browser, notebook editor, console, terminal, and file editor interfaces.
class NotebookBaseHandler:
def get_page_config(self) -> dict[str, Any]: ...
class TreeHandler(NotebookBaseHandler):
async def get(self, path: str = "") -> None: ...
class NotebookHandler(NotebookBaseHandler):
async def get(self, path: str = "") -> Any: ...
class ConsoleHandler(NotebookBaseHandler):
def get(self, path: str | None = None) -> Any: ...
class TerminalHandler(NotebookBaseHandler):
def get(self, path: str | None = None) -> Any: ...Jupyter server and lab extension hooks that enable the notebook to integrate with the broader Jupyter ecosystem and be discovered by other Jupyter applications.
def _jupyter_server_extension_paths() -> list[dict[str, str]]: ...
def _jupyter_server_extension_points() -> list[dict[str, Any]]: ...
def _jupyter_labextension_paths() -> list[dict[str, str]]: ...JupyterLab frontend extensions that provide notebook-specific functionality including checkpoint indicators, kernel status, output scrolling, and UI enhancements.
// Plugin interfaces
interface INotebookShell { ... }
interface INotebookPathOpener {
open(options: INotebookPathOpener.IOpenOptions): WindowProxy | null;
}
// Main plugins exported
const plugins: JupyterFrontEndPlugin<any>[];# Version information
VersionInfo = namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"])
# Application entry points
def main() -> None: ...
def launch_new_instance() -> None: ...
# Entry point functions
def main() -> None: ...
def launch_new_instance() -> None: ...
# Constants
__version__: str
version_info: VersionInfo