Modern Text User Interface framework for building cross-platform terminal and web applications with Python
Overall
score
93%
Build a terminal application that processes a list of items in the background while displaying real-time progress and allowing user interaction.
Create a Textual application with the following functionality:
The application should display:
When the "Start" button is pressed:
When the "Cancel" button is pressed:
@generates
from textual.app import App, ComposeResult
from textual.widgets import Button, Label, Static
from textual.containers import Container
class ProcessorApp(App):
"""Application that processes items in the background with progress tracking."""
def compose(self) -> ComposeResult:
"""Create the application layout."""
pass
def on_button_pressed(self, event: Button.Pressed) -> None:
"""Handle button press events."""
pass
def process_items(self) -> None:
"""Background method that processes items with progress tracking."""
passProvides the TUI framework for building terminal applications with background task support.
Install with Tessl CLI
npx tessl i tessl/pypi-textualevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10