arkouda.history

Module Contents

Classes

HistoryRetriever

HistoryRetriever is an abstract base class that defines the retrieve method signature

NotebookHistoryRetriever

NotebookHistoryRetriever implements the retrieve method to get command history

ShellHistoryRetriever

ShellHistoryRetriever implements the retrieve method to get command history from the

class arkouda.history.HistoryRetriever

HistoryRetriever is an abstract base class that defines the retrieve method signature and implements _filter_arkouda_command

abstract retrieve(command_filter: str | None = None, num_commands: int | None = None) List[str]

Generates list of commands executed within a Python REPL shell, Jupyter notebook, or IPython notebook, with an optional command filter and number of commands to return.

Parameters:
  • num_commands (int) – The number of commands from history to retrieve

  • command_filter (str) – String containing characters used to select a subset of command history.

Returns:

A list of commands from the Python shell, Jupyter notebook, or IPython notebook

Return type:

List[str]

class arkouda.history.NotebookHistoryRetriever

Bases: IPython.core.history.HistoryAccessor, HistoryRetriever

NotebookHistoryRetriever implements the retrieve method to get command history from a Jupyter notebook or IPython shell.

retrieve(command_filter: str | None = None, num_commands: int | None = None) List[str]

Generates list of commands executed within a Jupyter notebook or IPython shell, with an optional command filter and number of commands to return.

Parameters:
  • num_commands (int) – The number of commands from history to retrieve

  • command_filter (str) – String containing characters used to select a subset of command history.

Returns:

A list of commands from the Python shell, Jupyter notebook, or IPython notebook

Return type:

List[str]

class arkouda.history.ShellHistoryRetriever

Bases: HistoryRetriever

ShellHistoryRetriever implements the retrieve method to get command history from the Python REPL shell.

retrieve(command_filter: str | None = None, num_commands: int | None = None) List[str]

Generates list of commands executed within the a Python REPL shell, with an optional command filter and number of commands to return.

Parameters:
  • num_commands (int) – The number of commands from history to retrieve

  • command_filter (str) – String containing characters used to select a subset of command history.

Returns:

A list of commands from the Python shell, Jupyter notebook, or IPython notebook

Return type:

List[str]