oe-python-template-example 0.4.3__py3-none-any.whl → 0.4.5__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_example/cli.py +2 -2
- oe_python_template_example/utils/.vendored/bottle.py +0 -1
- oe_python_template_example/utils/_gui.py +6 -2
- {oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/METADATA +21 -17
- {oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/RECORD +8 -8
- {oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/WHEEL +0 -0
- {oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/entry_points.txt +0 -0
- {oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/licenses/LICENSE +0 -0
@@ -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 Example")
|
|
15
15
|
prepare_cli(cli, f"🧠 OE Python Template Example 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:
|
@@ -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
|
|
{oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oe-python-template-example
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.5
|
4
4
|
Summary: 🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
|
5
5
|
Project-URL: Homepage, https://oe-python-template-example.readthedocs.io/en/latest/
|
6
6
|
Project-URL: Documentation, https://oe-python-template-example.readthedocs.io/en/latest/
|
@@ -376,11 +376,15 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
|
|
376
376
|
|
377
377
|
... or edit interactively within VSCode
|
378
378
|
|
379
|
-
Install the
|
380
|
-
|
379
|
+
Install the [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
|
380
|
+
|
381
|
+
Click on `examples/notebook.py` in VSCode and click on the caret next to the Run icon above the code (looks like a pencil) > "Start in marimo editor" (edit).
|
382
|
+
|
383
|
+
... or without prior cloning of the repository
|
381
384
|
|
382
|
-
|
383
|
-
|
385
|
+
```shell
|
386
|
+
uvx marimo run https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/refs/heads/main/examples/notebook.py
|
387
|
+
```
|
384
388
|
|
385
389
|
## Command Line Interface (CLI)
|
386
390
|
|
@@ -439,13 +443,22 @@ docker run helmuthva/oe-python-template-example system openapi --output-format=j
|
|
439
443
|
docker run helmuthva/oe-python-template-example system serve
|
440
444
|
```
|
441
445
|
|
442
|
-
|
446
|
+
The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
|
443
447
|
|
444
448
|
```shell
|
445
|
-
docker run
|
449
|
+
docker run helmuthva/oe-python-template-example-slim --help
|
450
|
+
docker run helmuthva/oe-python-template-example-slim hello world
|
446
451
|
```
|
447
452
|
|
448
|
-
|
453
|
+
You can pass environment variables as parameters:
|
454
|
+
|
455
|
+
```shell
|
456
|
+
docker run --env OE_PYTHON_TEMPLATE_EXAMPLE_HELLO_LANGUAGE=de_DE helmuthva/oe-python-template-example hello world
|
457
|
+
docker run --env OE_PYTHON_TEMPLATE_EXAMPLE_HELLO_LANGUAGE=en_US helmuthva/oe-python-template-example hello world
|
458
|
+
```
|
459
|
+
|
460
|
+
A docker compose stack is provided. Clone this repository using
|
461
|
+
`git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template-example.git` and enter the repository folder.
|
449
462
|
|
450
463
|
The .env is passed through from the host to the Docker container.
|
451
464
|
|
@@ -485,15 +498,6 @@ echo "Shutting down the API container ..."
|
|
485
498
|
docker compose down
|
486
499
|
```
|
487
500
|
|
488
|
-
#### Slim
|
489
|
-
|
490
|
-
The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
|
491
|
-
|
492
|
-
```shell
|
493
|
-
docker compose run --remove-orphans oe-python-template-example-slim --help
|
494
|
-
```
|
495
|
-
|
496
|
-
|
497
501
|
* See the [reference documentation of the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html) for detailed documentation of all API operations and parameters.
|
498
502
|
|
499
503
|
|
{oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/RECORD
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
oe_python_template_example/__init__.py,sha256=_Z3Xb-x95UODU66avOiwROVaouk_s0ZNB25KFnPoS40,226
|
2
2
|
oe_python_template_example/api.py,sha256=gwUAW_pWUABFtAAiuIg3-X-dG25m1l0rqpnMqlaGEJo,2206
|
3
|
-
oe_python_template_example/cli.py,sha256=
|
3
|
+
oe_python_template_example/cli.py,sha256=hZUPTuuUkIOpgTN6dP3nUh7gflxe6pdY2trruq3Eqhs,1709
|
4
4
|
oe_python_template_example/constants.py,sha256=eRFVkR2qwafucpx5ppJSohr5wpSRm4yh1deLpOTep9A,346
|
5
5
|
oe_python_template_example/hello/__init__.py,sha256=F7aJ_uhTPPnFLT_4GjI2GzjAmKrUhfe4KxqzrljuCVo,485
|
6
6
|
oe_python_template_example/hello/_api.py,sha256=B4gCojmEkvh-ScKPz0rXW70r4gVvg7SX2dfbZpUd2vU,2302
|
@@ -22,7 +22,7 @@ oe_python_template_example/utils/_cli.py,sha256=J_mFtXZ1gGeovGrE5i3wlokTOBfiTTKE
|
|
22
22
|
oe_python_template_example/utils/_console.py,sha256=u0-utcdRmVu4rabrYUyNOx8yPxLhxB3E92m22kSCwPQ,293
|
23
23
|
oe_python_template_example/utils/_constants.py,sha256=FRe5ZNaBwpBPwOHZVWYOlI-ijamfzdBVr8gl7gHMGT0,2932
|
24
24
|
oe_python_template_example/utils/_di.py,sha256=KdjiD4xZ_QSfbddkKWwsPJmG5YrIg6dzuBrlsd-FhxA,2189
|
25
|
-
oe_python_template_example/utils/_gui.py,sha256=
|
25
|
+
oe_python_template_example/utils/_gui.py,sha256=PmMTSmUOxbf6pmYCIgKrK5wNheh35aGd90I12y3L7Uc,5720
|
26
26
|
oe_python_template_example/utils/_health.py,sha256=35QOWe2r5InrEpGtuVMym9dI5aRHS0HWf4BHBRAUIj0,4102
|
27
27
|
oe_python_template_example/utils/_log.py,sha256=ZW4gs540SdjVK-2KeheLfDY15d_3xpO5FyGn7wTXyaM,3592
|
28
28
|
oe_python_template_example/utils/_logfire.py,sha256=wZYNVowQx7kh3XJoJ59FjUKdrta7tp6cXOJRUT6lDU8,2128
|
@@ -32,9 +32,9 @@ oe_python_template_example/utils/_sentry.py,sha256=2sXrDSZSYoDEM87v7CakJ6eGBtcIh
|
|
32
32
|
oe_python_template_example/utils/_service.py,sha256=atHAejvBucKXjzhsMSdOBBFa7rRD74zcV70Pp0pl0Tg,1038
|
33
33
|
oe_python_template_example/utils/_settings.py,sha256=owFoaHEzJnVD3EVyOWF4rfIY7g6eLnU6rN0m4VHhCbA,2464
|
34
34
|
oe_python_template_example/utils/boot.py,sha256=Qgq1sjT8d3fcfibnMyx5CVUJ_KKXgFI3ozZUIJbhh4I,2921
|
35
|
-
oe_python_template_example/utils/.vendored/bottle.py,sha256=
|
36
|
-
oe_python_template_example-0.4.
|
37
|
-
oe_python_template_example-0.4.
|
38
|
-
oe_python_template_example-0.4.
|
39
|
-
oe_python_template_example-0.4.
|
40
|
-
oe_python_template_example-0.4.
|
35
|
+
oe_python_template_example/utils/.vendored/bottle.py,sha256=kZAZmh3nRzCUf-9IKGpv0yqlMciZMA_DNaaMDdcQmt0,175437
|
36
|
+
oe_python_template_example-0.4.5.dist-info/METADATA,sha256=pMAf2hpHZvzhcWfCZI79Y4rtMcaEEspldfxDaZOl4H4,35216
|
37
|
+
oe_python_template_example-0.4.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
38
|
+
oe_python_template_example-0.4.5.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
|
39
|
+
oe_python_template_example-0.4.5.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
|
40
|
+
oe_python_template_example-0.4.5.dist-info/RECORD,,
|
{oe_python_template_example-0.4.3.dist-info → oe_python_template_example-0.4.5.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|