euporie.core.completion

Contain the main class for a notebook file.

Classes

CompleteEvent([text_inserted, ...])

Event that called the completer.

Completer()

Base class for completer implementations.

Completion(text[, start_position, display, ...])

param text

The new string that will be inserted into the document.

Document([text, cursor_position, selection])

This is a immutable class around the text and cursor position, and contains methods for querying this data, e.g.

Kernel(kernel_tab[, threaded, allow_stdin, ...])

Run a notebook kernel and communicates with it asynchronously.

KernelCompleter(kernel)

A prompt_toolkit completer which provides completions from a Jupyter kernel.

class euporie.core.completion.KernelCompleter(kernel: euporie.core.kernel.Kernel)

Bases: prompt_toolkit.completion.base.Completer

A prompt_toolkit completer which provides completions from a Jupyter kernel.

get_completions(document: prompt_toolkit.document.Document, complete_event: prompt_toolkit.completion.base.CompleteEvent) Iterable[prompt_toolkit.completion.base.Completion]

Doe nothing as completions are retrieved asynchronously.

async get_completions_async(document: prompt_toolkit.document.Document, complete_event: prompt_toolkit.completion.base.CompleteEvent) AsyncGenerator[prompt_toolkit.completion.base.Completion, None]

Retrieve completions from a Kernel.