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.
- {mininterface-1.1.3 → mininterface-1.1.4}/PKG-INFO +6 -2
- {mininterface-1.1.3 → mininterface-1.1.4}/README.md +3 -1
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/__init__.py +1 -1
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/adaptor.py +10 -3
- {mininterface-1.1.3 → mininterface-1.1.4}/pyproject.toml +2 -3
- {mininterface-1.1.3 → mininterface-1.1.4}/LICENSE +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/__main__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/argparse_support.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/auxiliary.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_flags.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_parser.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/cli_utils.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/config_file.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/dataclass_creation.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/form_dict.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/future_compatibility.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/redirectable.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/run.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/shortcuts.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/showcase.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/start.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_lib/tyro_patches.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_mininterface/mixin.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/adaptor.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/facet.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_text_interface/timeout.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/adaptor.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/button_contents.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/facet.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/file_picker_input.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/form_contents.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/secret_input.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/style.tcss +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/textual_app.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/timeout.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/widgets.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/adaptor.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/date_entry.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/external_fix.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/facet.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/redirect_text_tkinter.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/secret_entry.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/select_input.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/timeout.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/utils.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/app.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/child_adaptor.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_web_interface/parent_adaptor.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/cli.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/exceptions.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/experimental.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/facet/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/interfaces.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/settings.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/__init__.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/alias.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/callback_tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/datetime_tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/flag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/internal.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/path_tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/secret_tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/select_tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/tag.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/tag_factory.py +0 -0
- {mininterface-1.1.3 → mininterface-1.1.4}/mininterface/tag/type_stubs.py +0 -0
- {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
|
+
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,<
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
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 = "
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/button_contents.py
RENAMED
|
File without changes
|
|
File without changes
|
{mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_textual_interface/file_picker_input.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mininterface-1.1.3 → mininterface-1.1.4}/mininterface/_tk_interface/redirect_text_tkinter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|