Simple Inputs and Outputs

class pumpia.module_handling.in_outs.simple.BaseIO(initial_value: ValT | Callable[[], ValT], *, verbose_name: str | None, label_style: str | None = None, hidden: bool = False)

Base class for input/output handling in modules.

Parameters:
  • initial_value (ValT or Callable[[], ValT]) – The initial value or a callable that returns the initial value.

  • verbose_name (str, optional) – The verbose name of the input/output (default is None).

  • label_style (str, optional) – The style of the label (default is None).

  • hidden (bool, optional) – Whether the input/output is hidden (default is False).

verbose_name
Type:

str | None

value
Type:

ValT

label
Type:

ttk.Label

label_var
Type:

tk.StringVar

value_var
Type:

TkVarT

hidden
Type:

bool

set_parent(parent: tk.Misc)

Sets the parent of the input/output.

class pumpia.module_handling.in_outs.simple.BaseInput(initial_value: ValT | Callable[[], ValT], *, verbose_name: str | None = None, label_style: str | None = None, entry_style: str | None = None, hidden: bool = False)

Base class for input handling for modules. Has the same attributes and methods as BaseIO unless stated below.

Parameters:

entry_style (str, optional) – The style of the entry widget (default is None).

entry
Type:

ttk.Entry

class pumpia.module_handling.in_outs.simple.BaseOutput(initial_value: ValT | Callable[[], ValT], *, verbose_name: str | None = None, label_style: str | None = None, val_label_style: str | None = None, reset_on_analysis: bool = False, hidden: bool = False)

Base class for output handling. Has the same attributes and methods as BaseIO unless stated below.

Parameters:

val_label_style (str, optional) – The style of the value label widget (default is None).

value_label
Type:

ttk.Label

class pumpia.module_handling.in_outs.simple.OptionInput(options_map: dict[str, DictValT], initial: str | Callable[[], str], *, verbose_name: str | None = None, label_style=None, entry_style=None, allow_inv_mapping: bool = False, hidden: bool = False)

Represents an option input. Has the same attributes and methods as BaseInput unless stated below.

Parameters:
  • options_map (dict[str, DictValT]) – A dictionary mapping the options in the dropdown to an object.

  • initial (str or Callable[[], str]) – The initial dropdown value or a callable that returns the initial value.

  • allow_inv_mapping (bool, optional) – Whether to allow inverse mapping from an object to the option (default is False).

class pumpia.module_handling.in_outs.simple.BoolInput(initial_value: bool | Callable[[], bool] = True, *, verbose_name: str | None = None, label_style: str | None = None, entry_style: str | None = None, hidden: bool = False)

Represents a boolean input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.StringInput(initial_value: str | Callable[[], str] = '', *, verbose_name: str | None = None, label_style=None, entry_style=None, hidden: bool = False)

Represents a string input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.IntInput(initial_value: int | Callable[[], int] = 0, *, verbose_name: str | None = None, label_style=None, entry_style=None, hidden: bool = False)

Represents an integer input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.PercInput(initial_value: float | Callable[[], float] = 0, *, verbose_name: str | None = None, label_style=None, entry_style=None, hidden: bool = False)

Represents a percentage input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.FloatInput(initial_value: float | Callable[[], float] = 0, *, verbose_name: str | None = None, label_style=None, entry_style=None, hidden: bool = False)

Represents a float input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.DateInput(initial_value=datetime.date(2025, 6, 18), *, verbose_name: str | None = None, label_style=None, entry_style=None, hidden: bool = False)

Represents a date input. Has the same attributes and methods as BaseInput unless stated below.

class pumpia.module_handling.in_outs.simple.StringOutput(initial_value: str | Callable[[], str] = '', *, verbose_name: str | None = None, label_style=None, val_label_style=None, reset_on_analysis: bool = False, hidden: bool = False)

Represents a string output. Has the same attributes and methods as BaseOutput unless stated below.

class pumpia.module_handling.in_outs.simple.IntOutput(initial_value: int | Callable[[], int] = 0, *, verbose_name: str | None = None, label_style=None, val_label_style=None, reset_on_analysis: bool = False, hidden: bool = False)

Represents an integer output. Has the same attributes and methods as BaseOutput unless stated below.

class pumpia.module_handling.in_outs.simple.FloatOutput(initial_value: float | Callable[[], float] = 0, *, verbose_name: str | None = None, label_style=None, val_label_style=None, reset_on_analysis: bool = False, hidden: bool = False)

Represents a float output. Has the same attributes and methods as BaseOutput unless stated below.

class pumpia.module_handling.in_outs.simple.DateOutput(initial_value=datetime.date(2025, 6, 18), *, verbose_name: str | None = None, label_style=None, val_label_style=None, reset_on_analysis: bool = False, hidden: bool = False)

Represents a date output. Has the same attributes and methods as BaseOutput unless stated below.