async_kernel.typing
Classes:
- 
          SocketID–Mapping of Kernel.port_<id>for sockets. Ref.
- 
          RunMode–An Enum of the kernel run modes available for 
- 
          KernelConcurrencyMode–
- 
          MsgType–An enumeration of Message msg_typefor shell and control messages.
- 
          MetadataKeys–This is an enum of keys for metadata in kernel messages 
- 
          Tags–Tags recognised by the kernel. 
- 
          MsgHeader–
- 
          Message–A message. 
- 
          Job–An async_kernel.typing.Message bundled with sockit_id, socket and ident. 
    
    
              Bases: StrEnum
An Enum of the kernel run modes available for altering how message requests are run.
String match options
Each of these options will give a match.
- <value>
- <##value>
- 'RunMode.<value>.
special usage
Run mode can be used in execute requests.
Add it at the top line (or use the string equivalent "##
Methods:
- 
            get_mode–Get a RunMode from the code if it is found. 
Attributes:
- 
          queue–The message for the handler is run sequentially with other messages that are queued. 
- 
          task–The message for the handler are run concurrently in task (starting immediately). 
- 
          thread–Messages for the handler are run concurrently in a thread (starting immediately). 
- 
          blocking–Run the handler directly as soon as it is received. 
class-attribute
      instance-attribute
  
¶
queue = 'queue'
The message for the handler is run sequentially with other messages that are queued.
class-attribute
      instance-attribute
  
¶
task = 'task'
The message for the handler are run concurrently in task (starting immediately).
class-attribute
      instance-attribute
  
¶
thread = 'thread'
Messages for the handler are run concurrently in a thread (starting immediately).
class-attribute
      instance-attribute
  
¶
blocking = 'blocking'
Run the handler directly as soon as it is received.
Warning
This mode blocks the message loop.
Use this for short running messages that should be processed as soon as it is received.
classmethod
  
¶
    Get a RunMode from the code if it is found.
Source code in src/async_kernel/typing.py
              | 86 87 88 89 90 91 92 93 94 95 |  | 
    
              Bases: StrEnum
An enumeration of Message msg_type for shell and control messages.
Some message types are on the control channel only.
Attributes:
- 
          kernel_info_request–
- 
          comm_info_request–
- 
          execute_request–
- 
          complete_request–
- 
          is_complete_request–
- 
          inspect_request–
- 
          history_request–
- 
          comm_open–
- 
          comm_msg–
- 
          comm_close–
- 
          interrupt_request–async_kernel.Kernel.interrupt_request (control channel only) 
- 
          shutdown_request–async_kernel.Kernel.shutdown_request (control channel only) 
- 
          debug_request–async_kernel.Kernel.debug_request (control channel only) 
class-attribute
      instance-attribute
  
¶
kernel_info_request = 'kernel_info_request'
class-attribute
      instance-attribute
  
¶
comm_info_request = 'comm_info_request'
class-attribute
      instance-attribute
  
¶
execute_request = 'execute_request'
class-attribute
      instance-attribute
  
¶
complete_request = 'complete_request'
class-attribute
      instance-attribute
  
¶
is_complete_request = 'is_complete_request'
class-attribute
      instance-attribute
  
¶
inspect_request = 'inspect_request'
class-attribute
      instance-attribute
  
¶
history_request = 'history_request'
class-attribute
      instance-attribute
  
¶
comm_open = 'comm_open'
class-attribute
      instance-attribute
  
¶
comm_close = 'comm_close'
class-attribute
      instance-attribute
  
¶
interrupt_request = 'interrupt_request'
async_kernel.Kernel.interrupt_request (control channel only)
class-attribute
      instance-attribute
  
¶
shutdown_request = 'shutdown_request'
async_kernel.Kernel.shutdown_request (control channel only)
class-attribute
      instance-attribute
  
¶
debug_request = 'debug_request'
async_kernel.Kernel.debug_request (control channel only)
    
              Bases: StrEnum
This is an enum of keys for metadata in kernel messages that are used in async_kernel.
Note
Metadata can be edited in Jupyter lab "Advanced tools" and Tags can be added using "common tools" in the right side bar.
Attributes:
- 
          tags–The tagsmetadata key corresponds to is a list of strings.
- 
          timeout–The timeoutmetadata key is used to specify a timeout for execution of the code.
- 
          suppress_error_message–A message to print when the error has been suppressed using async_kernel.typing.Tags.suppress_error. 
class-attribute
      instance-attribute
  
¶
tags = 'tags'
The tags metadata key corresponds to is a list of strings. 
The list can be edited by the user in a notebook. see also: Tags.
class-attribute
      instance-attribute
  
¶
timeout = 'timeout'
The timeout metadata key is used to specify a timeout for execution of the code.
The value should be a floating point value of the timeout in seconds.
class-attribute
      instance-attribute
  
¶
suppress_error_message = 'suppress-error-message'
A message to print when the error has been suppressed using async_kernel.typing.Tags.suppress_error.
Note
The default message is '⚠'.
    
              Bases: StrEnum
Tags recognised by the kernel.
Info
Tags are can be added per cell.
- Jupyter: via the right side bar.
- VScode: via Jupyter variables explorer/
Attributes:
- 
          suppress_error–Suppress exceptions that occur during execution of the code cell. 
class-attribute
      instance-attribute
  
¶
suppress_error = 'suppress-error'
Suppress exceptions that occur during execution of the code cell.
Warning
The code block will return as 'ok' and there will be no message recorded.
    
    
    
              Bases: TypedDict
Attributes:
- 
          code(str) –The code to execute. 
- 
          silent(bool) –
- 
          store_history(bool) –
- 
          user_expressions(dict[str, str]) –
- 
          allow_stdin(bool) –
- 
          stop_on_error(bool) –