oe-python-template 0.13.4__tar.gz → 0.13.7__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.
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/PKG-INFO +13 -16
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/README.md +12 -15
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/pyproject.toml +2 -2
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/cli.py +2 -2
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_gui.py +6 -2
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/.gitignore +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/LICENSE +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/__init__.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/api.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/constants.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/__init__.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_api.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_cli.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_constants.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_gui.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_models.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_service.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_settings.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/__init__.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_api.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_cli.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_gui.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_service.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_settings.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/.vendored/bottle.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/__init__.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_api.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_cli.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_console.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_constants.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_di.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_health.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_log.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_logfire.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_notebook.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_process.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_sentry.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_service.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_settings.py +0 -0
- {oe_python_template-0.13.4 → oe_python_template-0.13.7}/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.
|
3
|
+
Version: 0.13.7
|
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/
|
@@ -303,15 +303,12 @@ The following examples run from source - clone this repository using
|
|
303
303
|
```python
|
304
304
|
"""Example script demonstrating the usage of the service provided by OE Python Template."""
|
305
305
|
|
306
|
-
from dotenv import load_dotenv
|
307
306
|
from rich.console import Console
|
308
307
|
|
309
308
|
from oe_python_template.hello import Service
|
310
309
|
|
311
310
|
console = Console()
|
312
311
|
|
313
|
-
load_dotenv()
|
314
|
-
|
315
312
|
message = Service.get_hello_world()
|
316
313
|
console.print(f"[blue]{message}[/blue]")
|
317
314
|
```
|
@@ -438,13 +435,22 @@ docker run helmuthva/oe-python-template system openapi --output-format=json
|
|
438
435
|
docker run helmuthva/oe-python-template system serve
|
439
436
|
```
|
440
437
|
|
441
|
-
|
438
|
+
The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
|
442
439
|
|
443
440
|
```shell
|
444
|
-
docker run
|
441
|
+
docker run helmuthva/oe-python-template-slim --help
|
442
|
+
docker run helmuthva/oe-python-template-slim hello world
|
445
443
|
```
|
446
444
|
|
447
|
-
|
445
|
+
You can pass environment variables as parameters:
|
446
|
+
|
447
|
+
```shell
|
448
|
+
docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=de_DE helmuthva/oe-python-template hello world
|
449
|
+
docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=en_US helmuthva/oe-python-template hello world
|
450
|
+
```
|
451
|
+
|
452
|
+
A docker compose stack is provided. Clone this repository using
|
453
|
+
`git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git` and enter the repository folder.
|
448
454
|
|
449
455
|
The .env is passed through from the host to the Docker container.
|
450
456
|
|
@@ -484,15 +490,6 @@ echo "Shutting down the API container ..."
|
|
484
490
|
docker compose down
|
485
491
|
```
|
486
492
|
|
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
493
|
* 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
494
|
|
498
495
|
|
@@ -229,15 +229,12 @@ The following examples run from source - clone this repository using
|
|
229
229
|
```python
|
230
230
|
"""Example script demonstrating the usage of the service provided by OE Python Template."""
|
231
231
|
|
232
|
-
from dotenv import load_dotenv
|
233
232
|
from rich.console import Console
|
234
233
|
|
235
234
|
from oe_python_template.hello import Service
|
236
235
|
|
237
236
|
console = Console()
|
238
237
|
|
239
|
-
load_dotenv()
|
240
|
-
|
241
238
|
message = Service.get_hello_world()
|
242
239
|
console.print(f"[blue]{message}[/blue]")
|
243
240
|
```
|
@@ -364,13 +361,22 @@ docker run helmuthva/oe-python-template system openapi --output-format=json
|
|
364
361
|
docker run helmuthva/oe-python-template system serve
|
365
362
|
```
|
366
363
|
|
367
|
-
|
364
|
+
The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
|
368
365
|
|
369
366
|
```shell
|
370
|
-
docker run
|
367
|
+
docker run helmuthva/oe-python-template-slim --help
|
368
|
+
docker run helmuthva/oe-python-template-slim hello world
|
371
369
|
```
|
372
370
|
|
373
|
-
|
371
|
+
You can pass environment variables as parameters:
|
372
|
+
|
373
|
+
```shell
|
374
|
+
docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=de_DE helmuthva/oe-python-template hello world
|
375
|
+
docker run --env OE_PYTHON_TEMPLATE_HELLO_LANGUAGE=en_US helmuthva/oe-python-template hello world
|
376
|
+
```
|
377
|
+
|
378
|
+
A docker compose stack is provided. Clone this repository using
|
379
|
+
`git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git` and enter the repository folder.
|
374
380
|
|
375
381
|
The .env is passed through from the host to the Docker container.
|
376
382
|
|
@@ -410,15 +416,6 @@ echo "Shutting down the API container ..."
|
|
410
416
|
docker compose down
|
411
417
|
```
|
412
418
|
|
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
419
|
* 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
420
|
|
424
421
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "oe-python-template"
|
3
|
-
version = "0.13.
|
3
|
+
version = "0.13.7"
|
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.
|
282
|
+
current_version = "0.13.7"
|
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:
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_gui.py
RENAMED
@@ -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
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/__init__.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_api.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_cli.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_constants.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_gui.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_models.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_service.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/hello/_settings.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/__init__.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_api.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_cli.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_gui.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_service.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/system/_settings.py
RENAMED
File without changes
|
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/__init__.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_api.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_cli.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_console.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_constants.py
RENAMED
File without changes
|
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_health.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_log.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_logfire.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_notebook.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_process.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_sentry.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_service.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/_settings.py
RENAMED
File without changes
|
{oe_python_template-0.13.4 → oe_python_template-0.13.7}/src/oe_python_template/utils/boot.py
RENAMED
File without changes
|