Skip to content

Instantly share code, notes, and snippets.

@patrick91
Created September 7, 2025 19:34
Show Gist options
  • Save patrick91/3d49b9043d771f561306bce48e1aeb2a to your computer and use it in GitHub Desktop.
Save patrick91/3d49b9043d771f561306bce48e1aeb2a to your computer and use it in GitHub Desktop.
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "rich-toolkit",
# ]
# ///
from rich_toolkit.menu import Menu, Option
value_from_menu = Menu(
label="What would you like to start with?",
options=[
Option({"value": "black", "name": "Hello world example"}),
Option({"value": "red", "name": "Framework starter"}),
Option({"value": "green", "name": "Application starter"}),
Option({"value": "green", "name": "Template from a GitHub Repo"}),
],
).ask()
print(value_from_menu)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment