bundles / ipykernel latest / ipykernel / connect / get_connection_info
function
ipykernel.connect:get_connection_info
source: /ipykernel/connect.py:52
Signature
def get_connection_info(connection_file: str | None = None, unpack: bool = False) → str | dict[str, Any]Summary
Return the connection information for the current Kernel.
Parameters
connection_file: str [optional]The connection file to be used. Can be given by absolute path, or IPython will search in the security directory. If run from IPython,
If unspecified, the connection file for the currently running IPython Kernel will be used, which is only allowed from inside a kernel.
unpack: bool [default: False]if True, return the unpacked dict, otherwise just the string contents of the file.
Returns
: The connection dictionary of the current kernel, as string or dict,: depending on `unpack`.
Aliases
ipykernel.get_connection_info