ft-menu-1 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ Metadata-Version: 2.3
2
+ Name: ft-menu-1
3
+ Version: 0.1.0
4
+ Summary: implements functionality for dispatch table function
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+
8
+ ### Overview
9
+
10
+ ft_menu_1 is package that is implemented as a solution to an excercise in the book Python Workout by Reuven Lerner.
@@ -0,0 +1,3 @@
1
+ ### Overview
2
+
3
+ ft_menu_1 is package that is implemented as a solution to an excercise in the book Python Workout by Reuven Lerner.
@@ -0,0 +1,14 @@
1
+ [project]
2
+ name = "ft-menu-1"
3
+ version = "0.1.0"
4
+ description = "implements functionality for dispatch table function"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = []
8
+
9
+ [project.scripts]
10
+ ft-menu-1 = "ft_menu_1:main"
11
+
12
+ [build-system]
13
+ requires = ["uv_build>=0.12.5,<0.13.0"]
14
+ build-backend = "uv_build"
@@ -0,0 +1,14 @@
1
+ [project]
2
+ name = "ft-menu-1"
3
+ version = "0.1.0"
4
+ description = "implements functionality for dispatch table function"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ dependencies = []
8
+
9
+ [project.scripts]
10
+ ft-menu-1 = "ft_menu_1:main"
11
+
12
+ [build-system]
13
+ requires = ["uv_build>=0.12.5,<0.13.0"]
14
+ build-backend = "uv_build"
@@ -0,0 +1 @@
1
+ from .menu import menu
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env python3
2
+
3
+ def menu(**options):
4
+
5
+ while True:
6
+
7
+ options_string = "/".join(sorted(options))
8
+
9
+ choice = input(f'Enter a choice from ({options_string}): ')
10
+
11
+ if choice in options:
12
+
13
+ return options[choice]()
14
+
15
+ print('Not a valid option')