oe-python-template-example 0.2.13__py3-none-any.whl → 0.2.14__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.
@@ -1,7 +1,9 @@
1
1
  """CLI (Command Line Interface) of OE Python Template Example."""
2
2
 
3
3
  import os
4
+ import sys
4
5
  from enum import StrEnum
6
+ from pathlib import Path
5
7
  from typing import Annotated
6
8
 
7
9
  import typer
@@ -12,7 +14,7 @@ from rich.console import Console
12
14
  from . import Service, Utterance, __version__
13
15
  from .api import api_v1, api_v2
14
16
 
15
- cli = typer.Typer(name="Command Line Interface of OE Python Template Example")
17
+ cli = typer.Typer(help="Command Line Interface of OE Python Template Example")
16
18
  _service = Service()
17
19
  _console = Console()
18
20
 
@@ -129,11 +131,13 @@ def openapi(
129
131
 
130
132
 
131
133
  def _apply_cli_settings(cli: typer.Typer, epilog: str) -> None:
132
- """Add epilog to all typers in the tree and configure default behavior."""
133
- cli.info.epilog = epilog
134
+ """Configure default behavior and add epilog to all typers in the tree."""
134
135
  cli.info.no_args_is_help = True
135
- for command in cli.registered_commands:
136
- command.epilog = cli.info.epilog
136
+
137
+ if not any(arg.endswith("typer") for arg in Path(sys.argv[0]).parts):
138
+ cli.info.epilog = epilog
139
+ for command in cli.registered_commands:
140
+ command.epilog = cli.info.epilog
137
141
 
138
142
 
139
143
  _apply_cli_settings(
@@ -49,8 +49,7 @@ class Service:
49
49
  match self._settings.language:
50
50
  case Language.GERMAN:
51
51
  return "Hallo, Welt!"
52
- case _:
53
- return "Hello, world!"
52
+ return "Hello, world!"
54
53
 
55
54
  @staticmethod
56
55
  def echo(utterance: Utterance) -> Echo:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.2.13
3
+ Version: 0.2.14
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/
@@ -50,13 +50,13 @@ Classifier: Typing :: Typed
50
50
  Requires-Python: <4.0,>=3.11
51
51
  Requires-Dist: fastapi[all,standard]>=0.115.12
52
52
  Requires-Dist: pydantic-settings>=2.8.1
53
- Requires-Dist: pydantic>=2.10.6
53
+ Requires-Dist: pydantic>=2.11.1
54
54
  Requires-Dist: typer>=0.15.1
55
55
  Provides-Extra: examples
56
56
  Requires-Dist: jinja2>=3.1.6; extra == 'examples'
57
57
  Requires-Dist: jupyter>=1.1.1; extra == 'examples'
58
- Requires-Dist: marimo>=0.11.28; extra == 'examples'
59
- Requires-Dist: streamlit>=1.44.0; extra == 'examples'
58
+ Requires-Dist: marimo>=0.12.2; extra == 'examples'
59
+ Requires-Dist: streamlit>=1.44.1; extra == 'examples'
60
60
  Description-Content-Type: text/markdown
61
61
 
62
62
 
@@ -1,12 +1,12 @@
1
1
  oe_python_template_example/__init__.py,sha256=Ks3KjkBuzEO1gaezabSfal_WVOsJbuweHwRCs58oRv4,435
2
2
  oe_python_template_example/api.py,sha256=jP3nVgU06OHK0F9oi3h5_xZRWYsAu2fF80ezGshLk70,5034
3
- oe_python_template_example/cli.py,sha256=0Du3lJATAT1Gnh02WuJuGfHAbL0eYD7YZNvVP47_mNQ,3761
3
+ oe_python_template_example/cli.py,sha256=qBEl2AweQxL14VZBGN3l8Y6CpDpp2hXM69O4veuc6QI,3884
4
4
  oe_python_template_example/constants.py,sha256=6uQHr2CRgzWQWhUQCRRKiPuFhzKB2iblZk3dIRQ5dDc,358
5
5
  oe_python_template_example/models.py,sha256=IbegPBFJq0OCAWS70V-ozl6coMd0dC2OsHZY-nIumGs,846
6
- oe_python_template_example/service.py,sha256=2bxTQH9JeM4ugoQMpTp-pOdANOSZ0HZrQc4JpJzXBqg,1650
6
+ oe_python_template_example/service.py,sha256=WY7W6MG55cp0sfNVBWSkelXJcZ3dXIY5MQemUeQC-MA,1622
7
7
  oe_python_template_example/settings.py,sha256=mQu7Bl2EhR6taQLqbaK1s86Ngn3kLVeEoMyhCqbydig,751
8
- oe_python_template_example-0.2.13.dist-info/METADATA,sha256=58zLLqmTyOnZOPgoWdRs9xpej6ClReq3KS9G0O7yoag,29752
9
- oe_python_template_example-0.2.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
- oe_python_template_example-0.2.13.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
11
- oe_python_template_example-0.2.13.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
- oe_python_template_example-0.2.13.dist-info/RECORD,,
8
+ oe_python_template_example-0.2.14.dist-info/METADATA,sha256=EyDEUUw2LwpklQyu02Vkus0cts_V_KQwSYU9I17dVrk,29751
9
+ oe_python_template_example-0.2.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
10
+ oe_python_template_example-0.2.14.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
11
+ oe_python_template_example-0.2.14.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
12
+ oe_python_template_example-0.2.14.dist-info/RECORD,,