mininterface 1.1.3__tar.gz → 1.1.4__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.
Files changed (73) hide show
  1. {mininterface-1.1.3 → mininterface-1.1.4}/PKG-INFO +6 -2
  2. {mininterface-1.1.3 → mininterface-1.1.4}/README.md +3 -1
  3. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/__init__.py +1 -1
  4. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/adaptor.py +10 -3
  5. {mininterface-1.1.3 → mininterface-1.1.4}/pyproject.toml +2 -3
  6. {mininterface-1.1.3 → mininterface-1.1.4}/LICENSE +0 -0
  7. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/__init__.py +0 -0
  8. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/__main__.py +0 -0
  9. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/__init__.py +0 -0
  10. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/argparse_support.py +0 -0
  11. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/auxiliary.py +0 -0
  12. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_flags.py +0 -0
  13. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_parser.py +0 -0
  14. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_utils.py +0 -0
  15. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/config_file.py +0 -0
  16. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/dataclass_creation.py +0 -0
  17. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/form_dict.py +0 -0
  18. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/future_compatibility.py +0 -0
  19. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/redirectable.py +0 -0
  20. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/run.py +0 -0
  21. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/shortcuts.py +0 -0
  22. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/showcase.py +0 -0
  23. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/start.py +0 -0
  24. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/tyro_patches.py +0 -0
  25. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/mixin.py +0 -0
  26. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/__init__.py +0 -0
  27. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/adaptor.py +0 -0
  28. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/facet.py +0 -0
  29. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/timeout.py +0 -0
  30. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/__init__.py +0 -0
  31. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/adaptor.py +0 -0
  32. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/button_contents.py +0 -0
  33. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/facet.py +0 -0
  34. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/file_picker_input.py +0 -0
  35. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/form_contents.py +0 -0
  36. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/secret_input.py +0 -0
  37. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/style.tcss +0 -0
  38. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/textual_app.py +0 -0
  39. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/timeout.py +0 -0
  40. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/widgets.py +0 -0
  41. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/__init__.py +0 -0
  42. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/adaptor.py +0 -0
  43. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/date_entry.py +0 -0
  44. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/external_fix.py +0 -0
  45. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/facet.py +0 -0
  46. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/redirect_text_tkinter.py +0 -0
  47. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/secret_entry.py +0 -0
  48. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/select_input.py +0 -0
  49. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/timeout.py +0 -0
  50. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/utils.py +0 -0
  51. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/__init__.py +0 -0
  52. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/app.py +0 -0
  53. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/child_adaptor.py +0 -0
  54. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/parent_adaptor.py +0 -0
  55. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/cli.py +0 -0
  56. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/exceptions.py +0 -0
  57. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/experimental.py +0 -0
  58. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/facet/__init__.py +0 -0
  59. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/interfaces.py +0 -0
  60. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/settings.py +0 -0
  61. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/__init__.py +0 -0
  62. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/alias.py +0 -0
  63. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/callback_tag.py +0 -0
  64. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/datetime_tag.py +0 -0
  65. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/flag.py +0 -0
  66. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/internal.py +0 -0
  67. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/path_tag.py +0 -0
  68. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/secret_tag.py +0 -0
  69. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/select_tag.py +0 -0
  70. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/tag.py +0 -0
  71. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/tag_factory.py +0 -0
  72. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/type_stubs.py +0 -0
  73. {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/validators.py +0 -0
@@ -1,18 +1,19 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mininterface
3
- Version: 1.1.3
3
+ Version: 1.1.4
4
4
  Summary: A minimal access to GUI, TUI, CLI and config
5
5
  License: LGPL-3.0-or-later
6
6
  License-File: LICENSE
7
7
  Author: Edvard Rejthar
8
8
  Author-email: edvard.rejthar@nic.cz
9
- Requires-Python: >=3.10,<3.14
9
+ Requires-Python: >=3.10,<4.0
10
10
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
16
17
  Provides-Extra: all
17
18
  Provides-Extra: basic
18
19
  Provides-Extra: gui
@@ -130,6 +131,8 @@ with run(Env) as m:
130
131
 
131
132
  Wrapper between various libraries that provide a user interface.
132
133
 
134
+ It allows you to focus on writing the program's core logic without worrying about input/output. It generates CLI arguments, parses config file, and shows a UI. Depending on the endpoint, the dialogs automatically use either a GUI, a mouse-clickable TUI, a lightweight terminal text interface, or be available via HTTP — all while maintaining exactly the same functionality.
135
+
133
136
  Writing a small and useful program might be a task that takes fifteen minutes. Adding a CLI to specify the parameters is not so much overhead. But building a simple GUI around it? HOURS! Hours spent on researching GUI libraries, wondering why the Python desktop app ecosystem lags so far behind the web world. All you need is a few input fields validated through a clickable window... You do not deserve to add hundred of lines of the code just to define some editable fields. *Mininterface* is here to help.
134
137
 
135
138
  The config variables needed by your program are kept in cozy dataclasses. Write less! The syntax of [tyro](https://github.com/brentyi/tyro) does not require any overhead (as its `argparse` alternatives do). You just annotate a class attribute, append a simple docstring and get a fully functional application:
@@ -337,3 +340,4 @@ If you're sure enough to start using *Mininterface*, convert the argparse into a
337
340
 
338
341
  !!! warning
339
342
  The argparse support is considered mostly for your evaluation as there are some [`differences`](Argparse-caveats.md) for advanced argparse CLI interfaces.
343
+
@@ -91,6 +91,8 @@ with run(Env) as m:
91
91
 
92
92
  Wrapper between various libraries that provide a user interface.
93
93
 
94
+ It allows you to focus on writing the program's core logic without worrying about input/output. It generates CLI arguments, parses config file, and shows a UI. Depending on the endpoint, the dialogs automatically use either a GUI, a mouse-clickable TUI, a lightweight terminal text interface, or be available via HTTP — all while maintaining exactly the same functionality.
95
+
94
96
  Writing a small and useful program might be a task that takes fifteen minutes. Adding a CLI to specify the parameters is not so much overhead. But building a simple GUI around it? HOURS! Hours spent on researching GUI libraries, wondering why the Python desktop app ecosystem lags so far behind the web world. All you need is a few input fields validated through a clickable window... You do not deserve to add hundred of lines of the code just to define some editable fields. *Mininterface* is here to help.
95
97
 
96
98
  The config variables needed by your program are kept in cozy dataclasses. Write less! The syntax of [tyro](https://github.com/brentyi/tyro) does not require any overhead (as its `argparse` alternatives do). You just annotate a class attribute, append a simple docstring and get a fully functional application:
@@ -297,4 +299,4 @@ print(m.env.time) # -> 14:21
297
299
  If you're sure enough to start using *Mininterface*, convert the argparse into a dataclass. Then, the IDE will auto-complete the hints as you type.
298
300
 
299
301
  !!! warning
300
- The argparse support is considered mostly for your evaluation as there are some [`differences`](Argparse-caveats.md) for advanced argparse CLI interfaces.
302
+ The argparse support is considered mostly for your evaluation as there are some [`differences`](Argparse-caveats.md) for advanced argparse CLI interfaces.
@@ -91,7 +91,7 @@ class Mininterface(Generic[EnvClass]):
91
91
  # m = run([Env, Env2]) -> .env will be the chosen one.
92
92
 
93
93
  # NOTE In Python3.14, type(self).__annotations__ will work.
94
- self._adaptor = self.__annotations__["_adaptor"](self, settings)
94
+ self._adaptor = type(self).__annotations__["_adaptor"](self, settings)
95
95
 
96
96
  def __enter__(self) -> "Self":
97
97
  """Usage within the with statement makes the program to attempt for the following benefits:
@@ -26,9 +26,16 @@ class BackendAdaptor(ABC):
26
26
 
27
27
  def __init__(self, interface: "Mininterface", settings: UiSettings | None):
28
28
  self.interface = interface
29
- # NOTE self.__annotations__ will pose problem at Python3.14
30
- self.facet = interface.facet = self.__annotations__["facet"](self, interface.env)
31
- self.settings = settings or self.__annotations__["settings"]()
29
+
30
+ # Why looping mro? Since 3.14, ex. MockAdaptor does not inherit .facet annotation from MinAdaptor.
31
+ for cl in type(self).__mro__:
32
+ try:
33
+ self.facet = interface.facet = cl.__annotations__["facet"](self, interface.env)
34
+ self.settings = settings or cl.__annotations__["settings"]()
35
+ except KeyError:
36
+ pass
37
+ else:
38
+ break
32
39
 
33
40
  @abstractmethod
34
41
  def widgetize(self, tag: Tag):
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "mininterface"
7
- version = "1.1.3"
7
+ version = "1.1.4"
8
8
  description = "A minimal access to GUI, TUI, CLI and config"
9
9
  authors = ["Edvard Rejthar <edvard.rejthar@nic.cz>"]
10
10
  license = "LGPL-3.0-or-later"
@@ -13,8 +13,7 @@ readme = "README.md"
13
13
 
14
14
  [tool.poetry.dependencies]
15
15
  # Minimal requirements (dialogs with partial .form support (m.form(dict) or m.form(dataclass_instance))
16
- python = ">=3.10,<3.14"
17
- # python = "^3.10" NOTE when tyro accepts Python3.14, get this line back
16
+ python = "^3.10"
18
17
  simple_term_menu = "*"
19
18
  annotated-types = "*"
20
19
  # Basic requirements (CLI and full .form support (m.form(dataclass_class))
File without changes