-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
47 lines (40 loc) · 1.19 KB
/
__init__.py
File metadata and controls
47 lines (40 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
"""Demo registry for python-clack demos."""
from collections.abc import Callable
from typing import TypedDict
from .config_builder import run as config_builder
from .form_wizard import run as form_wizard
from .progress_demo import run as progress_demo
from .quick_tour import run as quick_tour
from .validation import run as validation_demo
class DemoEntry(TypedDict):
"""Registry entry for a demo."""
label: str
hint: str
run: Callable[[], None]
DEMOS: dict[str, DemoEntry] = {
"quick_tour": {
"label": "Quick Tour",
"hint": "overview of all prompts",
"run": quick_tour,
},
"form_wizard": {
"label": "Form Wizard",
"hint": "multi-step form with data passing",
"run": form_wizard,
},
"config_builder": {
"label": "Configuration Builder",
"hint": "settings with disabled options",
"run": config_builder,
},
"progress": {
"label": "Progress & Logging",
"hint": "spinner states and log levels",
"run": progress_demo,
},
"validation": {
"label": "Validation Showcase",
"hint": "input validation patterns",
"run": validation_demo,
},
}