oe-python-template 0.13.5__py3-none-any.whl → 0.13.6__py3-none-any.whl
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.
- oe_python_template/cli.py +2 -2
- oe_python_template/utils/_gui.py +6 -2
- {oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/METADATA +1 -1
- {oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/RECORD +7 -7
- {oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/WHEEL +0 -0
- {oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/entry_points.txt +0 -0
- {oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/licenses/LICENSE +0 -0
oe_python_template/cli.py
CHANGED
@@ -6,7 +6,7 @@ from importlib.util import find_spec
|
|
6
6
|
import typer
|
7
7
|
|
8
8
|
from .constants import MODULES_TO_INSTRUMENT
|
9
|
-
from .utils import __version__, boot, console, get_logger, prepare_cli
|
9
|
+
from .utils import __is_running_in_container__, __version__, boot, console, get_logger, prepare_cli
|
10
10
|
|
11
11
|
boot(MODULES_TO_INSTRUMENT)
|
12
12
|
logger = get_logger(__name__)
|
@@ -15,7 +15,7 @@ cli = typer.Typer(help="Command Line Interface of OE Python Template")
|
|
15
15
|
prepare_cli(cli, f"🧠 OE Python Template v{__version__} - built with love in Berlin 🐻")
|
16
16
|
|
17
17
|
|
18
|
-
if find_spec("nicegui") and find_spec("webview"):
|
18
|
+
if find_spec("nicegui") and find_spec("webview") and not __is_running_in_container__:
|
19
19
|
|
20
20
|
@cli.command()
|
21
21
|
def gui() -> None:
|
oe_python_template/utils/_gui.py
CHANGED
@@ -6,7 +6,7 @@ from types import EllipsisType
|
|
6
6
|
from nicegui import app, events, ui
|
7
7
|
from nicegui import native as native_app
|
8
8
|
|
9
|
-
from ._constants import __project_name__
|
9
|
+
from ._constants import __is_running_in_container__, __project_name__
|
10
10
|
from ._di import locate_subclasses
|
11
11
|
from ._log import get_logger
|
12
12
|
|
@@ -55,8 +55,12 @@ def gui_run( # noqa: PLR0913, PLR0917
|
|
55
55
|
with_api: Whether to mount the API.
|
56
56
|
|
57
57
|
Raises:
|
58
|
-
ValueError: If with_notebook is True but notebook_path is None
|
58
|
+
ValueError: If with_notebook is True but notebook_path is None,
|
59
|
+
or trying to run native within container.
|
59
60
|
"""
|
61
|
+
if __is_running_in_container__ and native:
|
62
|
+
message = "Native GUI cannot be run in a container. Please run with uvx or in browser."
|
63
|
+
raise ValueError(message)
|
60
64
|
if with_api:
|
61
65
|
from ..api import api # noqa: PLC0415, TID252
|
62
66
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oe-python-template
|
3
|
-
Version: 0.13.
|
3
|
+
Version: 0.13.6
|
4
4
|
Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
5
5
|
Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
|
6
6
|
Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
oe_python_template/__init__.py,sha256=_Z3Xb-x95UODU66avOiwROVaouk_s0ZNB25KFnPoS40,226
|
2
2
|
oe_python_template/api.py,sha256=Hcpj4UYFrZBaE-O8Iwb7poGCCtlMIqrmNiFqJSKElqI,2190
|
3
|
-
oe_python_template/cli.py,sha256=
|
3
|
+
oe_python_template/cli.py,sha256=371khUxULDDmYkwf05MXNrgzpIoSgGY9CWp_DCICdxQ,1677
|
4
4
|
oe_python_template/constants.py,sha256=tIWRWxG7Ob-MwH8ucPplOMO3mCgXPo97acRjydpHiyg,330
|
5
5
|
oe_python_template/hello/__init__.py,sha256=F7aJ_uhTPPnFLT_4GjI2GzjAmKrUhfe4KxqzrljuCVo,485
|
6
6
|
oe_python_template/hello/_api.py,sha256=hWWlEDUfFY1se2ZzhqGMfPyD3FPwuA-YzxG9Q9z4F2o,2294
|
@@ -22,7 +22,7 @@ oe_python_template/utils/_cli.py,sha256=J_mFtXZ1gGeovGrE5i3wlokTOBfiTTKEz5magiRP
|
|
22
22
|
oe_python_template/utils/_console.py,sha256=u0-utcdRmVu4rabrYUyNOx8yPxLhxB3E92m22kSCwPQ,293
|
23
23
|
oe_python_template/utils/_constants.py,sha256=FRe5ZNaBwpBPwOHZVWYOlI-ijamfzdBVr8gl7gHMGT0,2932
|
24
24
|
oe_python_template/utils/_di.py,sha256=KdjiD4xZ_QSfbddkKWwsPJmG5YrIg6dzuBrlsd-FhxA,2189
|
25
|
-
oe_python_template/utils/_gui.py,sha256=
|
25
|
+
oe_python_template/utils/_gui.py,sha256=PmMTSmUOxbf6pmYCIgKrK5wNheh35aGd90I12y3L7Uc,5720
|
26
26
|
oe_python_template/utils/_health.py,sha256=35QOWe2r5InrEpGtuVMym9dI5aRHS0HWf4BHBRAUIj0,4102
|
27
27
|
oe_python_template/utils/_log.py,sha256=ZW4gs540SdjVK-2KeheLfDY15d_3xpO5FyGn7wTXyaM,3592
|
28
28
|
oe_python_template/utils/_logfire.py,sha256=wZYNVowQx7kh3XJoJ59FjUKdrta7tp6cXOJRUT6lDU8,2128
|
@@ -33,8 +33,8 @@ oe_python_template/utils/_service.py,sha256=atHAejvBucKXjzhsMSdOBBFa7rRD74zcV70P
|
|
33
33
|
oe_python_template/utils/_settings.py,sha256=owFoaHEzJnVD3EVyOWF4rfIY7g6eLnU6rN0m4VHhCbA,2464
|
34
34
|
oe_python_template/utils/boot.py,sha256=Qgq1sjT8d3fcfibnMyx5CVUJ_KKXgFI3ozZUIJbhh4I,2921
|
35
35
|
oe_python_template/utils/.vendored/bottle.py,sha256=kZAZmh3nRzCUf-9IKGpv0yqlMciZMA_DNaaMDdcQmt0,175437
|
36
|
-
oe_python_template-0.13.
|
37
|
-
oe_python_template-0.13.
|
38
|
-
oe_python_template-0.13.
|
39
|
-
oe_python_template-0.13.
|
40
|
-
oe_python_template-0.13.
|
36
|
+
oe_python_template-0.13.6.dist-info/METADATA,sha256=ehTfNQ73ovAfs8Aqdf4NoMuKlBkXaOtyE0Y4RKgzFgM,33856
|
37
|
+
oe_python_template-0.13.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
38
|
+
oe_python_template-0.13.6.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
|
39
|
+
oe_python_template-0.13.6.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
|
40
|
+
oe_python_template-0.13.6.dist-info/RECORD,,
|
File without changes
|
{oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/entry_points.txt
RENAMED
File without changes
|
{oe_python_template-0.13.5.dist-info → oe_python_template-0.13.6.dist-info}/licenses/LICENSE
RENAMED
File without changes
|