跳到主要内容

coding.jupyter.local_jupyter_server

本地Jupyter服务器

class LocalJupyterServer(JupyterConnectable)

__init__

def __init__(ip: str = "127.0.0.1",
port: Optional[int] = None,
token: Union[str, GenerateToken] = GenerateToken(),
log_file: str = "jupyter_gateway.log",
log_level: str = "INFO",
log_max_bytes: int = 1048576,
log_backup_count: int = 3)

在本地运行一个Jupyter Kernel Gateway服务器。

参数:

  • ip str, 可选 - 要绑定的IP地址。默认为"127.0.0.1"。
  • port Optional[int], optional - 如果要使用端口,可以指定端口号,如果为 None 则自动选择一个端口。默认为 None。
  • token Union[str, GenerateToken], 可选 - 用于Jupyter服务器的令牌。默认情况下将生成一个令牌。使用None将不使用令牌进行身份验证。默认为GenerateToken()。
  • log_file str, 可选 - 用于Jupyter Kernel Gateway日志的文件。默认为"jupyter_gateway.log"。
  • log_level str, 可选 - Jupyter Kernel Gateway 的日志级别。默认为 "INFO"。
  • log_max_bytes int, 可选 - 最大日志文件大小。默认为1048576。
  • log_backup_count int, 可选 - 日志轮换的备份数量。默认值为3。