Core foundational package providing base application classes, path utilities, and configuration management for the Jupyter ecosystem.
npx @tessl/cli install tessl/pypi-jupyter-core@5.8.0A foundational Python package that provides core functionality for the Jupyter ecosystem. It contains base application classes, configuration management systems, path utilities, and command-line tools that serve as the foundation for notebooks, kernels, and other Jupyter components. Designed for maximum reusability across the Jupyter ecosystem with built-in cross-platform compatibility.
pip install jupyter_coreimport jupyter_coreFor version information:
from jupyter_core import __version__, version_infoFor application development:
from jupyter_core.application import JupyterApp, JupyterAsyncAppFor path utilities:
from jupyter_core.paths import (
jupyter_config_dir, jupyter_data_dir, jupyter_runtime_dir,
jupyter_path, jupyter_config_path
)from jupyter_core.paths import jupyter_config_dir, jupyter_data_dir
from jupyter_core.application import JupyterApp
# Get standard Jupyter directories
config_dir = jupyter_config_dir()
data_dir = jupyter_data_dir()
print(f"Config directory: {config_dir}")
print(f"Data directory: {data_dir}")
# Create a simple Jupyter application
class MyJupyterApp(JupyterApp):
name = "my-jupyter-app"
description = "My custom Jupyter application"
def start(self):
self.log.info("Starting my Jupyter application")
print(f"Using config directory: {self.config_dir}")
print(f"Using data directory: {self.data_dir}")
# Launch the application
if __name__ == "__main__":
MyJupyterApp.launch_instance()Jupyter Core follows a layered architecture designed for extensibility:
This design enables consistent behavior across all Jupyter components while supporting the diverse needs of notebooks, kernels, extensions, and custom applications.
Base application classes and infrastructure for building Jupyter applications with built-in configuration management, logging, path handling, and lifecycle management.
class JupyterApp:
def __init__(self): ...
def initialize(self, argv=None): ...
def start(self): ...
@classmethod
def launch_instance(cls, argv=None, **kwargs): ...
class JupyterAsyncApp(JupyterApp):
async def initialize_async(self, argv=None): ...
async def start_async(self): ...Cross-platform directory discovery and path utilities for managing Jupyter configuration, data, and runtime directories with support for user-level, environment-level, and system-wide installations.
def jupyter_config_dir() -> str: ...
def jupyter_data_dir() -> str: ...
def jupyter_runtime_dir() -> str: ...
def jupyter_path(*subdirs: str) -> list[str]: ...
def jupyter_config_path() -> list[str]: ...Command-line utilities for Jupyter ecosystem management including the main jupyter command dispatcher, migration tools, and troubleshooting utilities.
def main() -> None: ...
def list_subcommands() -> list[str]: ...
def migrate() -> bool: ...
def get_data() -> dict[str, Any]: ...Core utility functions for directory management, deprecation warnings, async support, and platform-specific operations used throughout the Jupyter ecosystem.
def ensure_dir_exists(path: str | Path, mode: int = 0o777) -> None: ...
def deprecation(message: str, internal: str | list[str] = "jupyter_core/") -> None: ...
def run_sync(coro: Callable[..., Awaitable[T]]) -> Callable[..., T]: ...
def ensure_event_loop(prefer_selector_loop: bool = False) -> AbstractEventLoop: ...from typing import Any, Awaitable, Callable, TypeVar
from pathlib import Path
from traitlets.config.application import Application
# Version information
__version__: str
version_info: tuple[int, int, int, ...]
# Exception types
class NoStart(Exception): ...
# Type variables
T = TypeVar("T")