Create action submodule, add various examples

This commit is contained in:
2025-05-13 20:07:31 -04:00
parent 87a56ac40b
commit 2bdca72e04
39 changed files with 956 additions and 177 deletions

View File

@ -0,0 +1,22 @@
import asyncio
from falyx.selection import (
SelectionOption,
prompt_for_selection,
render_selection_dict_table,
)
menu = {
"A": SelectionOption("Run diagnostics", lambda: print("Running diagnostics...")),
"B": SelectionOption("Deploy to staging", lambda: print("Deploying...")),
}
table = render_selection_dict_table(
title="Main Menu",
selections=menu,
)
key = asyncio.run(prompt_for_selection(menu.keys(), table))
print(f"You selected: {key}")
menu[key.upper()].value()