snakia.core.tui.widget

Functions

abstractmethod(funcobj)

A decorator indicating abstract methods.

final(f)

A decorator to indicate final methods and final classes.

to_async(func)

Convert a sync function to an async function.

Classes

ABC()

Helper class that provides a standard way to create an ABC using inheritance.

AsyncBindable([default_value])

An asynchronous bindable.

Bindable([default_value])

A bindable value.

Canvas(width, height[, default_value])

A canvas is a 2D array of characters.

TypeVar(name, *constraints[, bound, ...])

Type variable.

Widget()

class snakia.core.tui.widget.Widget[source]

Bases: ABC

__init__()[source]
final async_state(default_value)[source]
Return type:

AsyncBindable[TypeVar(T)]

abstract on_render()[source]
Return type:

Canvas

final render()[source]
Return type:

Canvas

final state(default_value)[source]
Return type:

Bindable[TypeVar(T)]