{ } Raw JSON

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 : unicode

The path to the file to write

shell_port : int, optional

The port to use for ROUTER (shell) channel.

iopub_port : int, optional

The port to use for the SUB channel.

stdin_port : int, optional

The port to use for the ROUTER (raw input) channel.

control_port : int, optional

The port to use for the ROUTER (control) channel.

hb_port : int, optional

The port to use for the heartbeat REP channel.

ip : str, optional

The ip address the kernel will bind to.

key : bytes, optional

The Session key used for message authentication.

signature_scheme : str, optional

The 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, optional

The name of the kernel currently connected to.

curve_publickey : bytes, optional

CurveZMQ public key (Z85).

curve_secretkey : bytes, optional

CurveZMQ secret key (Z85).

Aliases

  • jupyter_client.write_connection_file