conntextual.ui.channel package#
Submodules#
conntextual.ui.channel.color module#
A module implementing color interfaces for channel enviroments.
conntextual.ui.channel.environment module#
A module implementing user interface elements for channel environments.
- class conntextual.ui.channel.environment.ChannelEnvironmentDisplay(renderable: ConsoleRenderable | RichCast | str = '', *, expand: bool = False, shrink: bool = False, markup: bool = True, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]#
Bases:
Static
A channel-environment interface element.
- add_channel(name: str, chan: Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], enum: RuntimeEnum | None) int [source]#
Add a channel to the table.
- by_index: List[Tuple[Coordinate, str | int]]#
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- channel_pattern: PatternPair#
- channels_by_row: Dict[int, SelectedChannel]#
- static create(name: str, command: ChannelCommandProcessor, source: ChannelEnvironmentSource, logger: Logger | LoggerAdapter[Any], app: AppInfo, channel_pattern: PatternPair) ChannelEnvironmentDisplay [source]#
Create a channel-environment display.
- highlight_style: Style | None#
- property label: str#
Obtain a label string for this instance.
- row_idx: int#
- selected: SelectedChannel#
- styles: RenderStyles#
conntextual.ui.channel.log module#
A module impementing a channel-environment log widget.
- class conntextual.ui.channel.log.ChannelEnvironmentLog(renderable: ConsoleRenderable | RichCast | str = '', *, expand: bool = False, shrink: bool = False, markup: bool = True, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]#
Bases:
Static
A channel-environment log widget.
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- logger: Logger | LoggerAdapter[Any]#
- parent_name: str#
- queue: SimpleQueue[LogRecord]#
- suggester: CommandSuggester | None#
- class conntextual.ui.channel.log.InputWithHistory(value: str | None = None, placeholder: str = '', highlighter: Highlighter | None = None, password: bool = False, *, restrict: str | None = None, type: Literal['integer', 'number', 'text'] = 'text', max_length: int = 0, suggester: Suggester | None = None, validators: Validator | Iterable[Validator] | None = None, validate_on: Iterable[Literal['blur', 'changed', 'submitted']] | None = None, valid_empty: bool = False, name: str | None = None, id: str | None = None, classes: str | None = None, disabled: bool = False)[source]#
Bases:
Input
An input with last-command history.
- BINDINGS: ClassVar[list[BindingType]] = [Binding(key='up', action='previous_command', description='previous command', show=True, key_display=None, priority=False)]#
- Key(s) | Description |:- | :- |left | Move the cursor left. |ctrl+left | Move the cursor one word to the left. |right | Move the cursor right or accept the completion suggestion. |ctrl+right | Move the cursor one word to the right. |backspace | Delete the character to the left of the cursor. |home,ctrl+a | Go to the beginning of the input. |end,ctrl+e | Go to the end of the input. |delete,ctrl+d | Delete the character to the right of the cursor. |enter | Submit the current value of the input. |ctrl+w | Delete the word to the left of the cursor. |ctrl+u | Delete everything to the left of the cursor. |ctrl+f | Delete the word to the right of the cursor. |ctrl+k | Delete everything to the right of the cursor. |
- can_focus: bool = True#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- previous: str#
conntextual.ui.channel.model module#
A module implementing a data model for channel environments.
- class conntextual.ui.channel.model.ChannelEnvironmentSource(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
Bases:
StrEnum
Possible sources of channel environments.
- CONNECTION_LOCAL = 'local connection'#
- CONNECTION_REMOTE = 'remote connection'#
- TASK = 'task'#
- class conntextual.ui.channel.model.Model(name: str, command: ChannelCommandProcessor, source: ChannelEnvironmentSource, logger: Logger | LoggerAdapter[Any], app: AppInfo)[source]#
Bases:
object
A model for channel environment displays.
- app: AppInfo#
- command: ChannelCommandProcessor#
- property env: ChannelEnvironment#
Get the channel environment.
- logger: Logger | LoggerAdapter[Any]#
- name: str#
- source: ChannelEnvironmentSource#
conntextual.ui.channel.pattern module#
A module implementing an include/exclude pattern matching interface.
- class conntextual.ui.channel.pattern.PatternPair(includes: List[Pattern[str]], excludes: List[Pattern[str]])[source]#
Bases:
NamedTuple
A container for managing pattern data.
- excludes: List[Pattern[str]]#
Alias for field number 1
- static from_dict(data: dict[str, str | List[str]]) PatternPair [source]#
Create a pattern pair from dictionary data.
- includes: List[Pattern[str]]#
Alias for field number 0
conntextual.ui.channel.plot module#
A module implementing a plot widget.
- class conntextual.ui.channel.plot.Plot(x: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], y: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], theme: str, marker: str, *args, title: str = 'under construction', **kwargs)[source]#
Bases:
PlotextPlot
A plot widget.
- can_focus: bool = False#
Widget may receive focus.
- can_focus_children: bool = True#
Widget’s children may receive focus.
- set_data(x: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], y: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) None [source]#
Assign new data.
conntextual.ui.channel.selected module#
A module implementing an interface for channel selection.
- class conntextual.ui.channel.selected.SelectedChannel(name: str, channel: tuple[Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], RuntimeEnum | None], timestamps: List[float], values: List[float | int | bool], start_ns: int)[source]#
Bases:
object
A container for selected-channel information.
- channel: tuple[Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], RuntimeEnum | None]#
- static create(name: str, channel: tuple[Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], RuntimeEnum | None]) SelectedChannel [source]#
Create a selected-channel instance.
- name: str#
- start_ns: int#
- timestamps: List[float]#
- values: List[float | int | bool]#
conntextual.ui.channel.suggester module#
A module implementing an input suggester for the channel-environment command widget.
- class conntextual.ui.channel.suggester.CommandSuggester(*, use_cache: bool = True, case_sensitive: bool = False)[source]#
Bases:
Suggester
An input suggester for channel environment commands.
- static create(processor: ChannelCommandProcessor) CommandSuggester [source]#
A method for creating a command suggester.
- processor: ChannelCommandProcessor#