oe-python-template 0.13.4__tar.gz → 0.13.6__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 (40) hide show
  1. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/PKG-INFO +13 -13
  2. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/README.md +12 -12
  3. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/pyproject.toml +2 -2
  4. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/cli.py +2 -2
  5. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_gui.py +6 -2
  6. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/.gitignore +0 -0
  7. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/LICENSE +0 -0
  8. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/__init__.py +0 -0
  9. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/api.py +0 -0
  10. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/constants.py +0 -0
  11. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/__init__.py +0 -0
  12. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_api.py +0 -0
  13. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_cli.py +0 -0
  14. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_constants.py +0 -0
  15. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_gui.py +0 -0
  16. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_models.py +0 -0
  17. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_service.py +0 -0
  18. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/hello/_settings.py +0 -0
  19. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/__init__.py +0 -0
  20. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/_api.py +0 -0
  21. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/_cli.py +0 -0
  22. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/_gui.py +0 -0
  23. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/_service.py +0 -0
  24. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/system/_settings.py +0 -0
  25. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/.vendored/bottle.py +0 -0
  26. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/__init__.py +0 -0
  27. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_api.py +0 -0
  28. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_cli.py +0 -0
  29. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_console.py +0 -0
  30. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_constants.py +0 -0
  31. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_di.py +0 -0
  32. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_health.py +0 -0
  33. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_log.py +0 -0
  34. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_logfire.py +0 -0
  35. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_notebook.py +0 -0
  36. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_process.py +0 -0
  37. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_sentry.py +0 -0
  38. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_service.py +0 -0
  39. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/_settings.py +0 -0
  40. {oe_python_template-0.13.4 → oe_python_template-0.13.6}/src/oe_python_template/utils/boot.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template
3
- Version: 0.13.4
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/
@@ -438,13 +438,22 @@ docker run helmuthva/oe-python-template system openapi --output-format=json
438
438
  docker run helmuthva/oe-python-template system serve
439
439
  ```
440
440
 
441
- Execute command:
441
+ The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
442
+
443
+ ```shell
444
+ docker run helmuthva/oe-python-template-slim --help
445
+ docker run helmuthva/oe-python-template-slim hello world
446
+ ```
447
+
448
+ You can pass environment variables as parameters:
442
449
 
443
450
  ```shell
444
- docker run --env THE_VAR=MY_VALUE helmuthva/oe-python-template hello echo "Lorem Ipsum"
451
+ docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=de_DE helmuthva/oe-python-template hello world
452
+ docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=en_US helmuthva/oe-python-template hello world
445
453
  ```
446
454
 
447
- Or use docker compose
455
+ A docker compose stack is provided. Clone this repository using
456
+ `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git` and enter the repository folder.
448
457
 
449
458
  The .env is passed through from the host to the Docker container.
450
459
 
@@ -484,15 +493,6 @@ echo "Shutting down the API container ..."
484
493
  docker compose down
485
494
  ```
486
495
 
487
- #### Slim
488
-
489
- The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
490
-
491
- ```shell
492
- docker compose run --remove-orphans oe-python-template-slim --help
493
- ```
494
-
495
-
496
496
  * See the [reference documentation of the API](https://oe-python-template.readthedocs.io/en/latest/api_reference_v1.html) for detailed documentation of all API operations and parameters.
497
497
 
498
498
 
@@ -364,13 +364,22 @@ docker run helmuthva/oe-python-template system openapi --output-format=json
364
364
  docker run helmuthva/oe-python-template system serve
365
365
  ```
366
366
 
367
- Execute command:
367
+ The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
368
+
369
+ ```shell
370
+ docker run helmuthva/oe-python-template-slim --help
371
+ docker run helmuthva/oe-python-template-slim hello world
372
+ ```
373
+
374
+ You can pass environment variables as parameters:
368
375
 
369
376
  ```shell
370
- docker run --env THE_VAR=MY_VALUE helmuthva/oe-python-template hello echo "Lorem Ipsum"
377
+ docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=de_DE helmuthva/oe-python-template hello world
378
+ docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=en_US helmuthva/oe-python-template hello world
371
379
  ```
372
380
 
373
- Or use docker compose
381
+ A docker compose stack is provided. Clone this repository using
382
+ `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git` and enter the repository folder.
374
383
 
375
384
  The .env is passed through from the host to the Docker container.
376
385
 
@@ -410,15 +419,6 @@ echo "Shutting down the API container ..."
410
419
  docker compose down
411
420
  ```
412
421
 
413
- #### Slim
414
-
415
- The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
416
-
417
- ```shell
418
- docker compose run --remove-orphans oe-python-template-slim --help
419
- ```
420
-
421
-
422
422
  * See the [reference documentation of the API](https://oe-python-template.readthedocs.io/en/latest/api_reference_v1.html) for detailed documentation of all API operations and parameters.
423
423
 
424
424
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template"
3
- version = "0.13.4"
3
+ version = "0.13.6"
4
4
  description = "🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Helmut Hoffer von Ankershoffen", email = "helmuthva@gmail.com" }]
@@ -279,7 +279,7 @@ source = ["src/"]
279
279
 
280
280
 
281
281
  [tool.bumpversion]
282
- current_version = "0.13.4"
282
+ current_version = "0.13.6"
283
283
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
284
284
  serialize = ["{major}.{minor}.{patch}"]
285
285
  search = "{current_version}"
@@ -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:
@@ -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