Module

utils.terminal_boxes

Box-drawing character sets for Kida terminal templates.

ProvidesBoxChars(a frozen dataclass of box-drawing characters) and BoxSet(a proxy that selects a style by name from templates).

Usage in templates::

{% set b = box.round %}
{{ b.tl }}{{ b.h * width }}{{ b.tr }}

Thread-Safety: BothBoxChars and BoxSetare immutable. Safe for concurrent access.

Classes

BoxChars 11
A complete set of box-drawing characters for one style. Fields: tl, tr, bl, br: Corner charact…

A complete set of box-drawing characters for one style.

Fields:

tl, tr, bl, br: Corner characters (top-left, top-right, etc.)
h, v: Horizontal and vertical line characters.
lj, rj, tj, bj: Junction characters (left, right, top, bottom).
cross: Four-way junction character.

Attributes

Name Type Description
tl str
tr str
bl str
br str
h str
v str
lj str
rj str
tj str
bj str
cross str
BoxSet 3
Proxy object for accessing box-drawing styles from templates. Attribute access returns a ``BoxChar…

Proxy object for accessing box-drawing styles from templates.

Attribute access returns aBoxCharsinstance for the requested style. Whenunicode is False, all styles resolve to the asciiset.

Methods

Internal Methods 3
__init__ 1
def __init__(self, *, unicode: bool = True) -> None
Parameters
Name Type Description
unicode Default:True
__getattr__ 1 BoxChars
def __getattr__(self, name: str) -> BoxChars
Parameters
Name Type Description
name
Returns
BoxChars
__repr__ 0 str
def __repr__(self) -> str
Returns
str