Kernel customisation (notebook)¶
uv managed virtual environment¶
We can use uv to create a virtual environment for different versions of Python.
Let's create a new virtual environment in the folder named ".venv_py315" using uv.
Requires a recent version of uv to be installed.
%uv venv .venv_py315 --python 3.15 --clear
%uv pip install --directory .venv_py315 --python 3.15 async-kernel
Downloading cpython-3.15.0rc2-linux-x86_64-gnu (download) (35.5MiB)
Now we can write a kernel spec that uses uv to start the kernel from the virtual environment.
import pathlib
from async_kernel.kernelspec import write_kernel_spec
uv_path = pathlib.Path.cwd().joinpath(".venv_py315")
assert uv_path.exists()
write_kernel_spec(
name="async_3.15",
display_name="Python 3.15 (async)",
env={"UV_PROJECT_ENVIRONMENT": str(uv_path), "VIRTUAL_ENV": str(uv_path)},
command=("uv", "run", "--module", "async_kernel", "start"),
)
--------------------------------------------------------------------------- AssertionError Traceback (most recent call last) File ~/work/async-kernel/async-kernel/src/async_kernel/shell/ipshell.py:585, in IPShell.run_code(self, code_obj, result, async_) 583 await eval(code_obj, self.user_global_ns, self.user_ns) 584 else: --> 585 exec(code_obj, self.user_global_ns, self.user_ns) 586 except self.custom_exceptions: # pragma: no cover 587 etype, value, tb = sys.exc_info() Cell In[2], line 6 2 3 from async_kernel.kernelspec import write_kernel_spec 4 5 uv_path = pathlib.Path.cwd().joinpath(".venv_py315") ----> 6 assert uv_path.exists() 7 8 write_kernel_spec( 9 name="async_3.15", AssertionError:
The kernel spec with the display name "Python 3.15 (async kernel)" has been added. You will need to refresh the list of kernels for it to be available.
Embed the custom kernel in the kernelspec folder¶
When a callable is passed as the argument launcher to the function write_kernel_spec it is saved as a python file in the kernel spec folder. It will be used as the 'launcher' for the kernelspec.
Let's write a kernel that will echo (print) the code written to the cell.
import async_kernel.kernelspec
def launcher(settings: dict) -> None:
from async_kernel import Kernel
from async_kernel.interface import Interface
class EchoKernel(Kernel):
async def execute_request(self, job):
print(job["msg"]["content"]["code"])
return {"status": "ok", "execution_count": 0, "user_expressions": {}}
Interface.launch_instance(kernel_class=EchoKernel)
# Write the kernel spec
async_kernel.kernelspec.write_kernel_spec(name="echo", display_name="Echo kernel", launcher=launcher)
PosixPath('/home/runner/work/async-kernel/async-kernel/.venv/share/jupyter/kernels/echo')
Customize the shell¶
Sometimes it might be useful to customise the shell instead of the kernel.
Lets write IPshell as an echo a bypass keyword "# call".
import async_kernel.kernelspec
def launcher(settings: dict) -> None:
from traitlets import traitlets
from async_kernel.interface import Interface
from async_kernel.shell import IPShell
class EchoShell(IPShell):
@traitlets.default("banner1")
def _default_banner1(self) -> str:
return "Echo kernel with bypass\n"
def transform_cell(self, raw_cell):
if raw_cell.startswith("# call"):
return super().transform_cell(raw_cell)
return f'print("""{raw_cell}""")'
Interface.launch_instance(shell_class=EchoShell)
# Write the kernel spec
async_kernel.kernelspec.write_kernel_spec(
name="echo-shell-with-bypass", display_name="Echo with bypass", launcher=launcher
)
PosixPath('/home/runner/work/async-kernel/async-kernel/.venv/share/jupyter/kernels/echo-shell-with-bypass')
Configuration options¶
Configuration is done using traitlets configuration. Configuration options are available from the command line.
!async-kernel --help-all
async-kernel: A Jupyter kernel providing an asynchronous IPython shell.
Options
=======
The options below are convenience aliases to configurable class-options,
as listed in the "Equivalent to" description-line of the aliases.
To see all configurable class-options for some <cmd>, use:
<cmd> --help-all
--quiet
Only send stdout/stderr to output stream.
Equivalent to: [--Interface.quiet=True]
--no-quiet
Only send stdout/stderr to output stream.
Equivalent to: [--Interface.quiet=False]
--debug
Set log-level to debug, for the most verbose logging.
Equivalent to: [--Application.log_level=10]
--show-config
Show the application's configuration (human-readable format)
Equivalent to: [--Application.show_config=True]
--show-config-json
Show the application's configuration (json format)
Equivalent to: [--Application.show_config_json=True]
--automagic
Turn on the auto calling of magic commands. Type %%magic at the
IPython prompt for more information.
Equivalent to: [--InteractiveShell.automagic=True]
--no-automagic
Turn off the auto calling of magic commands.
Equivalent to: [--InteractiveShell.automagic=False]
--autoindent
Turn on autoindenting.
Equivalent to: [--InteractiveShell.autoindent=True]
--no-autoindent
Turn off autoindenting.
Equivalent to: [--InteractiveShell.autoindent=False]
--pdb
Enable auto calling the pdb debugger after every exception.
Equivalent to: [--InteractiveShell.pdb=True]
--no-pdb
Disable auto calling the pdb debugger after every exception.
Equivalent to: [--InteractiveShell.pdb=False]
--pprint
Enable auto pretty printing of results.
Equivalent to: [--PlainTextFormatter.pprint=True]
--no-pprint
Disable auto pretty printing of results.
Equivalent to: [--PlainTextFormatter.pprint=False]
--color-info
IPython can display information about objects via a set of functions,
and optionally can use colors for this, syntax highlighting
source code and various other elements. This is on by default, but can cause
problems with some pagers. If you see such problems, you can disable the
colours.
Equivalent to: [--InteractiveShell.color_info=True]
--no-color-info
Disable using colors for info related things.
Equivalent to: [--InteractiveShell.color_info=False]
--ignore-cwd
Exclude the current working directory from sys.path
Equivalent to: [--InteractiveShellApp.ignore_cwd=True]
--no-ignore-cwd
Include the current working directory in sys.path
Equivalent to: [--InteractiveShellApp.ignore_cwd=False]
--nosep
Eliminate all spacing between prompts.
Equivalent to: [--InteractiveShell.separate_in= --InteractiveShell.separate_out= --InteractiveShell.separate_out2=]
--pylab
Pre-load matplotlib and numpy for interactive use with
the default matplotlib backend. The exact options available
depend on what Matplotlib provides at runtime.
Equivalent to: [--InteractiveShellApp.pylab=auto]
--matplotlib
Configure matplotlib for interactive use with
the default matplotlib backend. The exact options available
depend on what Matplotlib provides at runtime.
Equivalent to: [--InteractiveShellApp.matplotlib=auto]
--log-level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
Equivalent to: [--Application.log_level]
-n, --name=<Unicode>
Default: 'async'
Equivalent to: [--Interface.kernel_name]
-f, --connection_file=<Unicode>
JSON file in which to store connection info [default: kernel-<pid>.json]
This file will contain the IP, ports, and authentication key needed to
connect clients to this kernel. By default, this file will be created in the
security dir of the current profile, but can be specified by absolute path.
Default: ''
Equivalent to: [--ZMQMessage.connection_file]
--launcher=<Unicode>
Default: ''
Equivalent to: [--Interface.launcher]
--timeout=<CFloat>
A timeout in seconds to complete execute requests.
Default: 0.0
Equivalent to: [--BaseShell.timeout]
--kernel_class=<Type>
Default: 'async_kernel.kernel.Kernel'
Equivalent to: [--Interface.kernel_class]
--shell_class=<Type>
Default: 'async_kernel.shell.ipshell.IPShell'
Equivalent to: [--Interface.shell_class]
--help_links=<list-item-1>...
A list of links provided kernel info request.
Default: []
Equivalent to: [--Kernel.help_links]
--supported_features=<list-item-1>...
A list of features supported by the kernel.
Default: []
Equivalent to: [--Kernel.supported_features]
--interface_class=<Type>
Default: 'async_kernel.interface.base.Interface'
Equivalent to: [--Interface.interface_class]
--host=<UseEnum>
Choices: any of ['tk', 'qt', 'custom'] or None
Default: None
Equivalent to: [--Interface.host]
--host_options=<key-1>=<value-1>...
Default: {}
Equivalent to: [--Interface.host_options]
--backend_options=<key-1>=<value-1>...
Default: {}
Equivalent to: [--Interface.backend_options]
--backend=<UseEnum>
Choices: any of ['asyncio', 'trio']
Default: <Backend.asyncio: 'asyncio'>
Equivalent to: [--Interface.backend]
--profile-dir=<Unicode>
Set the profile location directly. This overrides the logic used by the
`profile` option.
Default: ''
Equivalent to: [--ProfileDir.location]
--profile=<Unicode>
The IPython profile to use.
Default: 'default'
Equivalent to: [--BaseIPythonApplication.profile]
--ipython-dir=<Unicode>
The name of the IPython directory. This directory is used for logging
configuration (through profiles), history storage, etc. The default is
usually $HOME/.ipython. This option can also be specified through the
environment variable IPYTHONDIR.
Default: ''
Equivalent to: [--BaseIPythonApplication.ipython_dir]
--config=<Unicode>
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
Default: ''
Equivalent to: [--BaseIPythonApplication.extra_config_file]
--autocall=<Enum>
Make IPython automatically call any callable object even if you didn't type
explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
The value can be '0' to disable the feature, '1' for 'smart' autocall, where
it is not applied if there are no more arguments on the line, and '2' for
'full' autocall, where all callable objects are automatically called (even
if no arguments are present).
Choices: any of [0, 1, 2]
Default: 0
Equivalent to: [--InteractiveShell.autocall]
--colors=<Unicode>
Set the color scheme (nocolor, neutral, linux, lightbg).
Default: 'neutral'
Equivalent to: [--InteractiveShell.colors]
--theme=<Unicode>
Set the color scheme (nocolor, neutral, linux, lightbg).
Default: 'neutral'
Equivalent to: [--InteractiveShell.colors]
--logfile=<Unicode>
The name of the logfile to use.
Default: ''
Equivalent to: [--InteractiveShell.logfile]
--logappend=<Unicode>
Start logging to the given file in append mode. Use `logfile` to specify a
log file to **overwrite** logs to.
Default: ''
Equivalent to: [--InteractiveShell.logappend]
-c=<Unicode>
Execute the given command string.
Default: ''
Equivalent to: [--InteractiveShellApp.code_to_run]
-m=<Unicode>
Run the module as a script.
Default: ''
Equivalent to: [--InteractiveShellApp.module_to_run]
--ext=<list-item-1>...
Dotted module name(s) of one or more IPython extensions to load.
For specifying extra extensions to load on the command-line.
.. versionadded:: 7.10
Default: []
Equivalent to: [--InteractiveShellApp.extra_extensions]
--gui=<CaselessStrEnum>
Enable GUI event loop integration with any of ('asyncio', 'glut', 'gtk',
'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx',
'gtk2', 'qt4').
Choices: any of ['asyncio', 'glut', 'gtk', 'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx', 'gtk2', 'qt4'] (case-insensitive) or None
Default: None
Equivalent to: [--InteractiveShellApp.gui]
--pylab=<MatplotlibBackendCaselessStrEnum>
Pre-load matplotlib and numpy for interactive use, selecting a particular
matplotlib backend and loop integration. The exact options available depend
on what Matplotlib provides at runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
Equivalent to: [--InteractiveShellApp.pylab]
--matplotlib=<MatplotlibBackendCaselessStrEnum>
Configure matplotlib for interactive use with the default matplotlib
backend. The exact options available depend on what Matplotlib provides at
runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
Equivalent to: [--InteractiveShellApp.matplotlib]
--cache-size=<Int>
Set the size of the output cache. The default is 1000, you can change it
permanently in your config file. Setting it to 0 completely disables the
caching system, and the minimum value accepted is 3 (if you provide a value
less than 3, it is reset to 0 and a warning is issued). This limit is
defined because otherwise you'll spend more time re-flushing a too small
cache than working
Default: 1000
Equivalent to: [--InteractiveShell.cache_size]
Class options
=============
The command-line option below sets the respective configurable class-parameter:
--Class.parameter=value
This line is evaluated in Python, so simple expressions are allowed.
For instance, to set `C.a=[0,1,2]`, you may type this:
--C.a='range(3)'
InteractiveShellApp(Configurable) options
-----------------------------------------
--InteractiveShellApp.code_to_run=<Unicode>
Execute the given command string.
Default: ''
--InteractiveShellApp.exec_PYTHONSTARTUP=<Bool>
Run the file referenced by the PYTHONSTARTUP environment variable at IPython
startup.
Default: True
--InteractiveShellApp.exec_files=<list-item-1>...
List of files to run at IPython startup.
Default: []
--InteractiveShellApp.exec_lines=<list-item-1>...
lines of code to run at IPython startup.
Default: []
--InteractiveShellApp.extensions=<list-item-1>...
A list of dotted module names of IPython extensions to load.
Default: []
--InteractiveShellApp.extra_extensions=<list-item-1>...
Dotted module name(s) of one or more IPython extensions to load.
For specifying extra extensions to load on the command-line.
.. versionadded:: 7.10
Default: []
--InteractiveShellApp.file_to_run=<Unicode>
A file to be run
Default: ''
--InteractiveShellApp.gui=<CaselessStrEnum>
Enable GUI event loop integration with any of ('asyncio', 'glut', 'gtk',
'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx',
'gtk2', 'qt4').
Choices: any of ['asyncio', 'glut', 'gtk', 'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx', 'gtk2', 'qt4'] (case-insensitive) or None
Default: None
--InteractiveShellApp.hide_initial_ns=<Bool>
Should variables loaded at startup (by startup files, exec_lines, etc.) be
hidden from tools like %who?
Default: True
--InteractiveShellApp.ignore_cwd=<Bool>
If True, IPython will not add the current working directory to sys.path.
When False, the current working directory is added to sys.path, allowing
imports of modules defined in the current directory.
Default: False
--InteractiveShellApp.matplotlib=<MatplotlibBackendCaselessStrEnum>
Configure matplotlib for interactive use with the default matplotlib
backend. The exact options available depend on what Matplotlib provides at
runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
--InteractiveShellApp.module_to_run=<Unicode>
Run the module as a script.
Default: ''
--InteractiveShellApp.pylab=<MatplotlibBackendCaselessStrEnum>
Pre-load matplotlib and numpy for interactive use, selecting a particular
matplotlib backend and loop integration. The exact options available depend
on what Matplotlib provides at runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
--InteractiveShellApp.pylab_import_all=<Bool>
If true, IPython will populate the user namespace with numpy, pylab, etc.
and an ``import *`` is done from numpy and pylab, when using pylab mode.
When False, pylab mode should not import any names into the user namespace.
Default: True
--InteractiveShellApp.reraise_ipython_extension_failures=<Bool>
Reraise exceptions encountered loading IPython extensions?
Default: False
Application(SingletonConfigurable) options
------------------------------------------
--Application.log_datefmt=<Unicode>
The date format used by logging formatters for `logging.Formatter`
``datefmt`` parameter
Default: '%Y-%m-%d %H:%M:%S'
--Application.log_format=<Unicode>
The Logging format template
Default: '[%(name)s]%(highlevel)s %(message)s'
--Application.log_level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
--Application.logging_config=<key-1>=<value-1>...
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt
and log_format settings.
This configuration can be used to configure additional handlers (e.g. to
output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more
information see:
https://docs.python.org/3/library/logging.config.html#logging-config-
dictschema
This dictionary is merged with the base logging configuration which defines
the following:
* A logging formatter intended for interactive use called
``console``.
* A logging handler that writes to stderr called
``console`` which uses the formatter ``console``.
* A logger with the name of this application set to ``DEBUG``
level.
This example adds a new handler that writes to a file:
.. code-block:: python
c.Application.logging_config = {
"handlers": {
"file": {
"class": "logging.FileHandler",
"level": "DEBUG",
"filename": "<path/to/file>",
}
},
"loggers": {
"<application-name>": {
"level": "DEBUG",
# NOTE: if you don't list the default "console"
# handler here then it will be disabled
"handlers": ["console", "file"],
},
},
}
Default: {}
--Application.show_config=<Bool>
Instead of starting the Application, dump configuration to stdout
Default: False
--Application.show_config_json=<Bool>
Instead of starting the Application, dump configuration to stdout (as JSON)
Default: False
BaseIPythonApplication(Application) options
-------------------------------------------
--BaseIPythonApplication.add_ipython_dir_to_sys_path=<Bool>
Default: False
--BaseIPythonApplication.auto_create=<Bool>
Whether to create profile dir if it doesn't exist
Default: False
--BaseIPythonApplication.copy_config_files=<Bool>
Whether to install the default config files into the profile dir. If a new
profile is being created, and IPython contains config files for that
profile, then they will be staged into the new directory. Otherwise,
default config files will be automatically generated.
Default: False
--BaseIPythonApplication.extra_config_file=<Unicode>
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
Default: ''
--BaseIPythonApplication.ipython_dir=<Unicode>
The name of the IPython directory. This directory is used for logging
configuration (through profiles), history storage, etc. The default is
usually $HOME/.ipython. This option can also be specified through the
environment variable IPYTHONDIR.
Default: ''
--BaseIPythonApplication.log_datefmt=<Unicode>
The date format used by logging formatters for `logging.Formatter`
``datefmt`` parameter
Default: '%Y-%m-%d %H:%M:%S'
--BaseIPythonApplication.log_format=<Unicode>
The Logging format template
Default: '[%(name)s]%(highlevel)s %(message)s'
--BaseIPythonApplication.log_level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
--BaseIPythonApplication.logging_config=<key-1>=<value-1>...
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt
and log_format settings.
This configuration can be used to configure additional handlers (e.g. to
output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more
information see:
https://docs.python.org/3/library/logging.config.html#logging-config-
dictschema
This dictionary is merged with the base logging configuration which defines
the following:
* A logging formatter intended for interactive use called
``console``.
* A logging handler that writes to stderr called
``console`` which uses the formatter ``console``.
* A logger with the name of this application set to ``DEBUG``
level.
This example adds a new handler that writes to a file:
.. code-block:: python
c.Application.logging_config = {
"handlers": {
"file": {
"class": "logging.FileHandler",
"level": "DEBUG",
"filename": "<path/to/file>",
}
},
"loggers": {
"<application-name>": {
"level": "DEBUG",
# NOTE: if you don't list the default "console"
# handler here then it will be disabled
"handlers": ["console", "file"],
},
},
}
Default: {}
--BaseIPythonApplication.overwrite=<Bool>
Whether to overwrite existing config files when copying
Default: False
--BaseIPythonApplication.profile=<Unicode>
The IPython profile to use.
Default: 'default'
--BaseIPythonApplication.show_config=<Bool>
Instead of starting the Application, dump configuration to stdout
Default: False
--BaseIPythonApplication.show_config_json=<Bool>
Instead of starting the Application, dump configuration to stdout (as JSON)
Default: False
--BaseIPythonApplication.verbose_crash=<Bool>
Create a massive crash report when IPython encounters what may be an
internal error. The default is to append a short message to the usual
traceback
Default: False
Interface(StartStopTask, Application, Generic) options
------------------------------------------------------
--Interface.autostart_connections=<list-item-1>...
Default: []
--Interface.backend=<UseEnum>
Choices: any of ['asyncio', 'trio']
Default: <Backend.asyncio: 'asyncio'>
--Interface.backend_options=<key-1>=<value-1>...
Default: {}
--Interface.host=<UseEnum>
Choices: any of ['tk', 'qt', 'custom'] or None
Default: None
--Interface.host_options=<key-1>=<value-1>...
Default: {}
--Interface.interface_class=<Type>
Default: 'async_kernel.interface.base.Interface'
--Interface.kernel_class=<Type>
Default: 'async_kernel.kernel.Kernel'
--Interface.kernel_name=<Unicode>
Default: 'async'
--Interface.launcher=<Unicode>
Default: ''
--Interface.log_datefmt=<Unicode>
The date format used by logging formatters for `logging.Formatter`
``datefmt`` parameter
Default: '%Y-%m-%d %H:%M:%S'
--Interface.log_format=<Unicode>
The Logging format template
Default: '[%(name)s]%(highlevel)s %(message)s'
--Interface.log_level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
--Interface.logging_config=<key-1>=<value-1>...
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt
and log_format settings.
This configuration can be used to configure additional handlers (e.g. to
output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more
information see:
https://docs.python.org/3/library/logging.config.html#logging-config-
dictschema
This dictionary is merged with the base logging configuration which defines
the following:
* A logging formatter intended for interactive use called
``console``.
* A logging handler that writes to stderr called
``console`` which uses the formatter ``console``.
* A logger with the name of this application set to ``DEBUG``
level.
This example adds a new handler that writes to a file:
.. code-block:: python
c.Application.logging_config = {
"handlers": {
"file": {
"class": "logging.FileHandler",
"level": "DEBUG",
"filename": "<path/to/file>",
}
},
"loggers": {
"<application-name>": {
"level": "DEBUG",
# NOTE: if you don't list the default "console"
# handler here then it will be disabled
"handlers": ["console", "file"],
},
},
}
Default: {}
--Interface.quiet=<Bool>
Default: True
--Interface.shell_class=<Type>
Default: 'async_kernel.shell.ipshell.IPShell'
--Interface.show_config=<Bool>
Instead of starting the Application, dump configuration to stdout
Default: False
--Interface.show_config_json=<Bool>
Instead of starting the Application, dump configuration to stdout (as JSON)
Default: False
IPApp(Interface, BaseIPythonApplication, InteractiveShellApp, Generic) options
------------------------------------------------------------------------------
--IPApp.add_ipython_dir_to_sys_path=<Bool>
Default: False
--IPApp.auto_create=<Bool>
Whether to create profile dir if it doesn't exist
Default: False
--IPApp.autostart_connections=<list-item-1>...
Default: []
--IPApp.backend=<UseEnum>
Choices: any of ['asyncio', 'trio']
Default: <Backend.asyncio: 'asyncio'>
--IPApp.backend_options=<key-1>=<value-1>...
Default: {}
--IPApp.code_to_run=<Unicode>
Execute the given command string.
Default: ''
--IPApp.copy_config_files=<Bool>
Whether to install the default config files into the profile dir. If a new
profile is being created, and IPython contains config files for that
profile, then they will be staged into the new directory. Otherwise,
default config files will be automatically generated.
Default: False
--IPApp.description=<Unicode>
A description to use for the command line interface.
Default: 'async-kernel: A Jupyter kernel providing an asynchronous IPy...
--IPApp.exec_PYTHONSTARTUP=<Bool>
Run the file referenced by the PYTHONSTARTUP environment variable at IPython
startup.
Default: True
--IPApp.exec_files=<list-item-1>...
List of files to run at IPython startup.
Default: []
--IPApp.exec_lines=<list-item-1>...
lines of code to run at IPython startup.
Default: []
--IPApp.extensions=<list-item-1>...
A list of dotted module names of IPython extensions to load.
Default: []
--IPApp.extra_config_file=<Unicode>
Path to an extra config file to load.
If specified, load this config file in addition to any other IPython config.
Default: ''
--IPApp.extra_extensions=<list-item-1>...
Dotted module name(s) of one or more IPython extensions to load.
For specifying extra extensions to load on the command-line.
.. versionadded:: 7.10
Default: []
--IPApp.file_to_run=<Unicode>
A file to be run
Default: ''
--IPApp.gui=<CaselessStrEnum>
Enable GUI event loop integration with any of ('asyncio', 'glut', 'gtk',
'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx',
'gtk2', 'qt4').
Choices: any of ['asyncio', 'glut', 'gtk', 'gtk2', 'gtk3', 'gtk4', 'osx', 'pyglet', 'qt', 'qt5', 'qt6', 'tk', 'wx', 'gtk2', 'qt4'] (case-insensitive) or None
Default: None
--IPApp.hide_initial_ns=<Bool>
Should variables loaded at startup (by startup files, exec_lines, etc.) be
hidden from tools like %who?
Default: True
--IPApp.host=<UseEnum>
Choices: any of ['tk', 'qt', 'custom'] or None
Default: None
--IPApp.host_options=<key-1>=<value-1>...
Default: {}
--IPApp.ignore_cwd=<Bool>
If True, IPython will not add the current working directory to sys.path.
When False, the current working directory is added to sys.path, allowing
imports of modules defined in the current directory.
Default: False
--IPApp.interface_class=<Type>
Default: 'async_kernel.interface.base.Interface'
--IPApp.ipython_dir=<Unicode>
The name of the IPython directory. This directory is used for logging
configuration (through profiles), history storage, etc. The default is
usually $HOME/.ipython. This option can also be specified through the
environment variable IPYTHONDIR.
Default: ''
--IPApp.kernel_class=<Type>
Default: 'async_kernel.kernel.Kernel'
--IPApp.kernel_name=<Unicode>
Default: 'async'
--IPApp.launcher=<Unicode>
Default: ''
--IPApp.log_datefmt=<Unicode>
The date format used by logging formatters for `logging.Formatter`
``datefmt`` parameter
Default: '%Y-%m-%d %H:%M:%S'
--IPApp.log_format=<Unicode>
The Logging format template
Default: '[%(name)s]%(highlevel)s %(message)s'
--IPApp.log_level=<Enum>
Set the log level by value or name.
Choices: any of [0, 10, 20, 30, 40, 50, 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL']
Default: 30
--IPApp.logging_config=<key-1>=<value-1>...
Configure additional log handlers.
The default stderr logs handler is configured by the log_level, log_datefmt
and log_format settings.
This configuration can be used to configure additional handlers (e.g. to
output the log to a file) or for finer control over the default handlers.
If provided this should be a logging configuration dictionary, for more
information see:
https://docs.python.org/3/library/logging.config.html#logging-config-
dictschema
This dictionary is merged with the base logging configuration which defines
the following:
* A logging formatter intended for interactive use called
``console``.
* A logging handler that writes to stderr called
``console`` which uses the formatter ``console``.
* A logger with the name of this application set to ``DEBUG``
level.
This example adds a new handler that writes to a file:
.. code-block:: python
c.Application.logging_config = {
"handlers": {
"file": {
"class": "logging.FileHandler",
"level": "DEBUG",
"filename": "<path/to/file>",
}
},
"loggers": {
"<application-name>": {
"level": "DEBUG",
# NOTE: if you don't list the default "console"
# handler here then it will be disabled
"handlers": ["console", "file"],
},
},
}
Default: {}
--IPApp.matplotlib=<MatplotlibBackendCaselessStrEnum>
Configure matplotlib for interactive use with the default matplotlib
backend. The exact options available depend on what Matplotlib provides at
runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
--IPApp.module_to_run=<Unicode>
Run the module as a script.
Default: ''
--IPApp.overwrite=<Bool>
Whether to overwrite existing config files when copying
Default: False
--IPApp.profile=<Unicode>
The IPython profile to use.
Default: 'default'
--IPApp.pylab=<MatplotlibBackendCaselessStrEnum>
Pre-load matplotlib and numpy for interactive use, selecting a particular
matplotlib backend and loop integration. The exact options available depend
on what Matplotlib provides at runtime.
Choices: any of ['agg', 'auto', 'cairo', 'gtk3', 'gtk3agg', 'gtk3cairo', 'gtk4', 'gtk4agg', 'gtk4cairo', 'inline', 'macosx', 'nbagg', 'notebook', 'osx', 'pdf', 'pgf', 'ps', 'qt', 'qt5', 'qt5agg', 'qt5cairo', 'qt6', 'qtagg', 'qtcairo', 'svg', 'template', 'tk', 'tkagg', 'tkcairo', 'webagg', 'wx', 'wx', 'wxagg', 'wxcairo'] (case-insensitive) or None
Default: None
--IPApp.pylab_import_all=<Bool>
If true, IPython will populate the user namespace with numpy, pylab, etc.
and an ``import *`` is done from numpy and pylab, when using pylab mode.
When False, pylab mode should not import any names into the user namespace.
Default: True
--IPApp.quiet=<Bool>
Default: True
--IPApp.reraise_ipython_extension_failures=<Bool>
Reraise exceptions encountered loading IPython extensions?
Default: False
--IPApp.shell_class=<Type>
Default: 'async_kernel.shell.ipshell.IPShell'
--IPApp.show_config=<Bool>
Instead of starting the Application, dump configuration to stdout
Default: False
--IPApp.show_config_json=<Bool>
Instead of starting the Application, dump configuration to stdout (as JSON)
Default: False
--IPApp.verbose_crash=<Bool>
Create a massive crash report when IPython encounters what may be an
internal error. The default is to append a short message to the usual
traceback
Default: False
InteractiveShell(SingletonConfigurable) options
-----------------------------------------------
--InteractiveShell.ast_node_interactivity=<Enum>
'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which
nodes should be run interactively (displaying output from expressions).
Choices: any of ['all', 'last', 'last_expr', 'none', 'last_expr_or_assign']
Default: 'last_expr'
--InteractiveShell.ast_transformers=<list-item-1>...
A list of ast.NodeTransformer subclass instances, which will be applied to
user input before code is run.
Default: []
--InteractiveShell.autoawait=<Bool>
Automatically run await statement in the top level repl.
Default: True
--InteractiveShell.autocall=<Enum>
Make IPython automatically call any callable object even if you didn't type
explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
The value can be '0' to disable the feature, '1' for 'smart' autocall, where
it is not applied if there are no more arguments on the line, and '2' for
'full' autocall, where all callable objects are automatically called (even
if no arguments are present).
Choices: any of [0, 1, 2]
Default: 0
--InteractiveShell.autoindent=<Bool>
Autoindent IPython code entered interactively.
Default: True
--InteractiveShell.automagic=<Bool>
Enable magic commands to be called without the leading %.
Default: True
--InteractiveShell.banner1=<Unicode>
The part of the banner to be printed before the profile
Default: "Python 3.12.3 (main, Jul 15 2026, 23:46:41) [GCC 13.3.0]\nTy...
--InteractiveShell.banner2=<Unicode>
The part of the banner to be printed after the profile
Default: ''
--InteractiveShell.cache_size=<Int>
Set the size of the output cache. The default is 1000, you can change it
permanently in your config file. Setting it to 0 completely disables the
caching system, and the minimum value accepted is 3 (if you provide a value
less than 3, it is reset to 0 and a warning is issued). This limit is
defined because otherwise you'll spend more time re-flushing a too small
cache than working
Default: 1000
--InteractiveShell.colors=<Unicode>
Set the color scheme (nocolor, neutral, linux, lightbg).
Default: 'neutral'
--InteractiveShell.debug=<Bool>
Default: False
--InteractiveShell.display_page=<Bool>
If True, anything that would be passed to the pager will be displayed as
regular output instead.
Default: False
--InteractiveShell.enable_html_pager=<Bool>
(Provisional API) enables html representation in mime bundles sent to
pagers.
Default: False
--InteractiveShell.enable_tip=<Bool>
Set to show a tip when IPython starts.
Default: True
--InteractiveShell.history_length=<Int>
Total length of command history
Default: 10000
--InteractiveShell.history_load_length=<Int>
The number of saved history entries to be loaded into the history buffer at
startup.
Default: 1000
--InteractiveShell.inspector_class=<Type>
Class to use to instantiate the shell inspector
Default: 'IPython.core.oinspect.Inspector'
--InteractiveShell.ipython_dir=<Unicode>
Default: ''
--InteractiveShell.logappend=<Unicode>
Start logging to the given file in append mode. Use `logfile` to specify a
log file to **overwrite** logs to.
Default: ''
--InteractiveShell.logfile=<Unicode>
The name of the logfile to use.
Default: ''
--InteractiveShell.logstart=<Bool>
Start logging to the default log file in overwrite mode. Use `logappend` to
specify a log file to **append** logs to.
Default: False
--InteractiveShell.loop_runner=<Any>
Select the loop runner that will be used to execute top-level asynchronous
code
Default: 'IPython.core.interactiveshell._asyncio_runner'
--InteractiveShell.object_info_string_level=<Enum>
Choices: any of [0, 1, 2]
Default: 0
--InteractiveShell.pdb=<Bool>
Automatically call the pdb debugger after every exception.
Default: False
--InteractiveShell.quiet=<Bool>
Default: False
--InteractiveShell.separate_in=<SeparateUnicode>
Default: '\n'
--InteractiveShell.separate_out=<SeparateUnicode>
Default: ''
--InteractiveShell.separate_out2=<SeparateUnicode>
Default: ''
--InteractiveShell.show_rewritten_input=<Bool>
Show rewritten input, e.g. for autocall.
Default: True
--InteractiveShell.sphinxify_docstring=<Bool>
Enables rich html representation of docstrings. (This requires the docrepr
module).
Default: False
--InteractiveShell.system_raise_on_error=<Bool>
Raise an exception on non-zero exit status from shell commands executed via
the `!` operator. When set to True, shell commands that fail will raise
CalledProcessError, similar to the behavior of %%script magics.
Default: False
--InteractiveShell.warn_venv=<Bool>
Warn if running in a virtual environment with no IPython installed (so
IPython from the global environment is used).
Default: True
--InteractiveShell.wildcards_case_sensitive=<Bool>
Default: True
--InteractiveShell.xmode=<CaselessStrEnum>
Switch modes for the IPython exception handlers.
Choices: any of ['Context', 'Plain', 'Verbose', 'Minimal', 'Docs', 'Doctest'] (case-insensitive)
Default: 'Context'
BaseShell(HasInterface, LoggingConfigurable, Generic) options
-------------------------------------------------------------
--BaseShell.stop_on_error_time_offset=<Float>
An offset to add to the cancellation time to catch late arriving execute
requests.
Default: 0.0
--BaseShell.timeout=<CFloat>
A timeout in seconds to complete execute requests.
Default: 0.0
IPShell(BaseShell, InteractiveShell) options
--------------------------------------------
--IPShell.ast_node_interactivity=<Enum>
'all', 'last', 'last_expr' or 'none', 'last_expr_or_assign' specifying which
nodes should be run interactively (displaying output from expressions).
Choices: any of ['all', 'last', 'last_expr', 'none', 'last_expr_or_assign']
Default: 'last_expr'
--IPShell.ast_transformers=<list-item-1>...
A list of ast.NodeTransformer subclass instances, which will be applied to
user input before code is run.
Default: []
--IPShell.autoawait=<Bool>
Automatically run await statement in the top level repl.
Default: True
--IPShell.autocall=<Enum>
Make IPython automatically call any callable object even if you didn't type
explicit parentheses. For example, 'str 43' becomes 'str(43)' automatically.
The value can be '0' to disable the feature, '1' for 'smart' autocall, where
it is not applied if there are no more arguments on the line, and '2' for
'full' autocall, where all callable objects are automatically called (even
if no arguments are present).
Choices: any of [0, 1, 2]
Default: 0
--IPShell.automagic=<Bool>
Enable magic commands to be called without the leading %.
Default: True
--IPShell.banner1=<Unicode>
The part of the banner to be printed before the profile
Default: "Python 3.12.3 (main, Jul 15 2026, 23:46:41) [GCC 13.3.0]\nTy...
--IPShell.banner2=<Unicode>
The part of the banner to be printed after the profile
Default: ''
--IPShell.cache_size=<Int>
Set the size of the output cache. The default is 1000, you can change it
permanently in your config file. Setting it to 0 completely disables the
caching system, and the minimum value accepted is 3 (if you provide a value
less than 3, it is reset to 0 and a warning is issued). This limit is
defined because otherwise you'll spend more time re-flushing a too small
cache than working
Default: 1000
--IPShell.colors=<Unicode>
Set the color scheme (nocolor, neutral, linux, lightbg).
Default: 'neutral'
--IPShell.compiler_class=<Type>
Default: 'async_kernel.compiler.XCachingCompiler'
--IPShell.debug=<Bool>
Default: False
--IPShell.default_matplotlib_backends=<list-item-1>...
Default: ['inline', 'ipympl']
--IPShell.display_formatter_class=<Type>
Default: 'async_kernel.shell.ipshell.IPDisplayFormatter'
--IPShell.display_page=<Bool>
If True, anything that would be passed to the pager will be displayed as
regular output instead.
Default: False
--IPShell.display_pub_class=<Type>
Default: 'async_kernel.shell.ipshell.IPDisplayPublisher'
--IPShell.displayhook_class=<Type>
Default: 'async_kernel.shell.ipshell.IPDisplayHook'
--IPShell.enable_html_pager=<Bool>
(Provisional API) enables html representation in mime bundles sent to
pagers.
Default: False
--IPShell.enable_tip=<Bool>
Set to show a tip when IPython starts.
Default: True
--IPShell.history_length=<Int>
Total length of command history
Default: 10000
--IPShell.history_load_length=<Int>
The number of saved history entries to be loaded into the history buffer at
startup.
Default: 1000
--IPShell.inspector_class=<Type>
Class to use to instantiate the shell inspector
Default: 'IPython.core.oinspect.Inspector'
--IPShell.ipython_dir=<Unicode>
Default: ''
--IPShell.logappend=<Unicode>
Start logging to the given file in append mode. Use `logfile` to specify a
log file to **overwrite** logs to.
Default: ''
--IPShell.logfile=<Unicode>
The name of the logfile to use.
Default: ''
--IPShell.logstart=<Bool>
Start logging to the default log file in overwrite mode. Use `logappend` to
specify a log file to **append** logs to.
Default: False
--IPShell.object_info_string_level=<Enum>
Choices: any of [0, 1, 2]
Default: 0
--IPShell.pdb=<Bool>
Automatically call the pdb debugger after every exception.
Default: False
--IPShell.prefilter_manager_class=<Type>
Default: 'async_kernel.shell.ipshell.IPPrefilterManager'
--IPShell.quiet=<Bool>
Default: False
--IPShell.separate_in=<SeparateUnicode>
Default: '\n'
--IPShell.separate_out=<SeparateUnicode>
Default: ''
--IPShell.separate_out2=<SeparateUnicode>
Default: ''
--IPShell.show_rewritten_input=<Bool>
Show rewritten input, e.g. for autocall.
Default: True
--IPShell.sphinxify_docstring=<Bool>
Enables rich html representation of docstrings. (This requires the docrepr
module).
Default: False
--IPShell.stop_on_error_time_offset=<Float>
An offset to add to the cancellation time to catch late arriving execute
requests.
Default: 0.0
--IPShell.system_raise_on_error=<Bool>
Raise an exception on non-zero exit status from shell commands executed via
the `!` operator. When set to True, shell commands that fail will raise
CalledProcessError, similar to the behavior of %%script magics.
Default: False
--IPShell.timeout=<CFloat>
A timeout in seconds to complete execute requests.
Default: 0.0
--IPShell.warn_venv=<Bool>
Warn if running in a virtual environment with no IPython installed (so
IPython from the global environment is used).
Default: True
--IPShell.wildcards_case_sensitive=<Bool>
Default: True
--IPShell.xmode=<CaselessStrEnum>
Switch modes for the IPython exception handlers.
Choices: any of ['Context', 'Plain', 'Verbose', 'Minimal', 'Docs', 'Doctest'] (case-insensitive)
Default: 'Context'
PrefilterManager(Configurable) options
--------------------------------------
--PrefilterManager.multi_line_specials=<Bool>
Default: True
IPPrefilterManager(HasInterface, PrefilterManager) options
----------------------------------------------------------
--IPPrefilterManager.multi_line_specials=<Bool>
Default: True
DisplayFormatter(Configurable) options
--------------------------------------
--DisplayFormatter.active_types=<list-item-1>...
List of currently active mime-types to display. You can use this to set a
white-list for formats to display.
Most users will not need to change this value.
Default: []
IPDisplayFormatter(HasInterface, DisplayFormatter) options
----------------------------------------------------------
--IPDisplayFormatter.active_types=<list-item-1>...
List of currently active mime-types to display. You can use this to set a
white-list for formats to display.
Most users will not need to change this value.
Default: []
HistoryAccessor(HistoryAccessorBase) options
--------------------------------------------
--HistoryAccessor.connection_options=<key-1>=<value-1>...
Options for configuring the SQLite connection
These options are passed as keyword args to sqlite3.connect when
establishing database connections.
Default: {}
--HistoryAccessor.enabled=<Bool>
enable the SQLite history
set enabled=False to disable the SQLite history, in which case there will be
no stored history, no SQLite connection, and no background saving thread.
This may be necessary in some threaded environments where IPython is
embedded.
Default: False
--HistoryAccessor.hist_file=<Union>
Path to file to use for SQLite history database.
By default, IPython will put the history database in the IPython profile
directory. If you would rather share one history among profiles, you can
set this value in each, so that they are consistent.
Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
If you see IPython hanging, try setting this to something on a local disk,
e.g::
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
you can also use the specific value `:memory:` (including the colon at both
end but not the back ticks), to avoid creating an history file.
Default: traitlets.Undefined
HistoryManager(HistoryAccessor) options
---------------------------------------
--HistoryManager.connection_options=<key-1>=<value-1>...
Options for configuring the SQLite connection
These options are passed as keyword args to sqlite3.connect when
establishing database connections.
Default: {}
--HistoryManager.db_cache_size=<Int>
Write to database every x commands (higher values save disk access & power).
Values of 1 or less effectively disable caching.
Default: 0
--HistoryManager.db_log_output=<Bool>
Should the history database include output? (default: no)
Default: False
--HistoryManager.enabled=<Bool>
enable the SQLite history
set enabled=False to disable the SQLite history, in which case there will be
no stored history, no SQLite connection, and no background saving thread.
This may be necessary in some threaded environments where IPython is
embedded.
Default: False
--HistoryManager.hist_file=<Union>
Path to file to use for SQLite history database.
By default, IPython will put the history database in the IPython profile
directory. If you would rather share one history among profiles, you can
set this value in each, so that they are consistent.
Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
If you see IPython hanging, try setting this to something on a local disk,
e.g::
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
you can also use the specific value `:memory:` (including the colon at both
end but not the back ticks), to avoid creating an history file.
Default: traitlets.Undefined
IPHistoryManager(HasInterface, HistoryManager) options
------------------------------------------------------
--IPHistoryManager.connection_options=<key-1>=<value-1>...
Options for configuring the SQLite connection
These options are passed as keyword args to sqlite3.connect when
establishing database connections.
Default: {}
--IPHistoryManager.db_cache_size=<Int>
Write to database every x commands (higher values save disk access & power).
Values of 1 or less effectively disable caching.
Default: 0
--IPHistoryManager.db_log_output=<Bool>
Should the history database include output? (default: no)
Default: False
--IPHistoryManager.enabled=<Bool>
enable the SQLite history
set enabled=False to disable the SQLite history, in which case there will be
no stored history, no SQLite connection, and no background saving thread.
This may be necessary in some threaded environments where IPython is
embedded.
Default: False
--IPHistoryManager.hist_file=<Union>
Path to file to use for SQLite history database.
By default, IPython will put the history database in the IPython profile
directory. If you would rather share one history among profiles, you can
set this value in each, so that they are consistent.
Due to an issue with fcntl, SQLite is known to misbehave on some NFS mounts.
If you see IPython hanging, try setting this to something on a local disk,
e.g::
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
you can also use the specific value `:memory:` (including the colon at both
end but not the back ticks), to avoid creating an history file.
Default: traitlets.Undefined
IPDisplayHook(HasInterface, DisplayHook) options
------------------------------------------------
--IPDisplayHook.cache_size=<Int>
Default: 1000
--IPDisplayHook.do_full_cache=<Int>
Default: 0
Kernel(HasInterface, LoggingConfigurable, AsyncContextManagerMixin, Generic) options
------------------------------------------------------------------------------------
--Kernel.handle_in_shell_thread=<list-item-1>...
A list of `MsgType` that are always handled in the shell's thread (typically
the _MainThread_).
Default: [<MsgType.comm_msg: 'comm_msg'>, <MsgType.comm_open: 'comm_op...
--Kernel.help_links=<list-item-1>...
A list of links provided kernel info request.
Default: []
--Kernel.supported_features=<list-item-1>...
A list of features supported by the kernel.
Default: []
Debugger(HasInterface, LoggingConfigurable) options
---------------------------------------------------
--Debugger.no_debug=<list-item-1>...
A list of thread names to excluded when using debugy (on startup).
Default: ['IPythonHistorySavingThread']
BaseClient(BaseMessage, Generic) options
----------------------------------------
--BaseClient.default_input_hander=<Callable>
Default: None
LocalClient(HasInterface, BaseClient, Generic) options
------------------------------------------------------
--LocalClient.default_input_hander=<Callable>
Default: None
ProfileDir(LoggingConfigurable) options
---------------------------------------
--ProfileDir.location=<Unicode>
Set the profile location directly. This overrides the logic used by the
`profile` option.
Default: ''
ConnectionFileMixin(LoggingConfigurable) options
------------------------------------------------
--ConnectionFileMixin.connection_file=<Unicode>
JSON file in which to store connection info [default: kernel-<pid>.json]
This file will contain the IP, ports, and authentication key needed to
connect clients to this kernel. By default, this file will be created in the
security dir of the current profile, but can be specified by absolute path.
Default: ''
--ConnectionFileMixin.control_port=<Int>
set the control (ROUTER) port [default: random]
Default: 0
--ConnectionFileMixin.hb_port=<Int>
set the heartbeat port [default: random]
Default: 0
--ConnectionFileMixin.iopub_port=<Int>
set the iopub (PUB) port [default: random]
Default: 0
--ConnectionFileMixin.ip=<Unicode>
Set the kernel's IP address [default localhost]. If the IP address is
something other than localhost, then Consoles on other machines will be able
to connect to the Kernel, so be careful!
Default: ''
--ConnectionFileMixin.shell_port=<Int>
set the shell (ROUTER) port [default: random]
Default: 0
--ConnectionFileMixin.stdin_port=<Int>
set the stdin (ROUTER) port [default: random]
Default: 0
--ConnectionFileMixin.transport=<CaselessStrEnum>
Choices: any of ['tcp', 'ipc'] (case-insensitive)
Default: 'tcp'
ZMQMessage(BaseMessage, ConnectionFileMixin) options
----------------------------------------------------
--ZMQMessage.connection_file=<Unicode>
JSON file in which to store connection info [default: kernel-<pid>.json]
This file will contain the IP, ports, and authentication key needed to
connect clients to this kernel. By default, this file will be created in the
security dir of the current profile, but can be specified by absolute path.
Default: ''
--ZMQMessage.control_port=<Int>
set the control (ROUTER) port [default: random]
Default: 0
--ZMQMessage.hb_port=<Int>
set the heartbeat port [default: random]
Default: 0
--ZMQMessage.iopub_port=<Int>
set the iopub (PUB) port [default: random]
Default: 0
--ZMQMessage.ip=<Unicode>
Set the kernel's IP address [default localhost]. If the IP address is
something other than localhost, then Consoles on other machines will be able
to connect to the Kernel, so be careful!
Default: ''
--ZMQMessage.shell_port=<Int>
set the shell (ROUTER) port [default: random]
Default: 0
--ZMQMessage.stdin_port=<Int>
set the stdin (ROUTER) port [default: random]
Default: 0
--ZMQMessage.transport=<CaselessStrEnum>
Transport for sockets.
Choices: any of ['tcp', 'ipc'] (case-insensitive)
Default: 'tcp'
An exception occurred in pending callback <Pending ⛔message=Stopped early! 🏁 at 139848510541392 metadata:{'info': "<class 'asyn…App'>.stopped"} >