bundles / jupyter_client 8.10.0 / jupyter_client / connect / write_connection_file
function
jupyter_client.connect:write_connection_file
source: /jupyter_client/connect.py:55
Signature
def write_connection_file(fname: str | None = None, shell_port: int = 0, iopub_port: int = 0, stdin_port: int = 0, hb_port: int = 0, control_port: int = 0, ip: str = '', key: bytes = b'', transport: str = tcp, signature_scheme: str = hmac-sha256, kernel_name: str = '', curve_publickey: bytes | None = None, curve_secretkey: bytes | None = None, **kwargs: Any) → tuple[str, KernelConnectionInfo]Summary
Generates a JSON config file, including the selection of random ports.
Parameters
fname: unicodeThe path to the file to write
shell_port: int, optionalThe port to use for ROUTER (shell) channel.
iopub_port: int, optionalThe port to use for the SUB channel.
stdin_port: int, optionalThe port to use for the ROUTER (raw input) channel.
control_port: int, optionalThe port to use for the ROUTER (control) channel.
hb_port: int, optionalThe port to use for the heartbeat REP channel.
ip: str, optionalThe ip address the kernel will bind to.
key: bytes, optionalThe Session key used for message authentication.
signature_scheme: str, optionalThe scheme used for message authentication. This has the form 'digest-hash', where 'digest' is the scheme used for digests, and 'hash' is the name of the hash function used by the digest scheme. Currently, 'hmac' is the only supported digest scheme, and 'sha256' is the default hash function.
kernel_name: str, optionalThe name of the kernel currently connected to.
curve_publickey: bytes, optionalCurveZMQ public key (Z85).
curve_secretkey: bytes, optionalCurveZMQ secret key (Z85).
Aliases
jupyter_client.write_connection_file