oe-python-template 0.0.1__py3-none-any.whl → 0.0.2__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.
@@ -5,12 +5,11 @@ from .constants import (
5
5
  __project_path__,
6
6
  __version__,
7
7
  )
8
-
9
8
  from .service import Service
10
9
 
11
10
  __all__ = [
11
+ "Service",
12
12
  "__project_name__",
13
13
  "__project_path__",
14
14
  "__version__",
15
- "Service",
16
15
  ]
oe_python_template/cli.py CHANGED
@@ -5,7 +5,7 @@ from typing import Annotated
5
5
  import typer
6
6
  from rich.console import Console
7
7
 
8
- from oe_python_template import __version__, Service
8
+ from oe_python_template import Service, __version__
9
9
 
10
10
  console = Console()
11
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template
3
- Version: 0.0.1
3
+ Version: 0.0.2
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/
6
6
  Project-URL: Documentation, https://oe-python-template.readthedocs.io/
@@ -126,9 +126,9 @@ uvx oe-python-template command --help # all options for command
126
126
 
127
127
  * Copier template to scaffold Python projects compliant with best practices and modern tooling.
128
128
  * Various Examples:
129
+ - [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
129
130
  - [Streamlit web application](https://oe-python-template.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
130
131
  - [Jupyter notebook](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
131
- - [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
132
132
  * [Complete reference documenation](https://oe-python-template.readthedocs.io/en/latest/reference.html) on Read the Docs
133
133
  * [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template) including unit and E2E tests (reported on Codecov)
134
134
  * Matrix tested with [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/noxfile.py) to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
@@ -140,28 +140,51 @@ uvx oe-python-template command --help # all options for command
140
140
 
141
141
  ## Usage Examples
142
142
 
143
- ### Streamlit App
143
+ ### Minimal Python Script:
144
144
 
145
- [Try it out!](https://oe-python-template.streamlit.app) - [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/streamlit.py)
145
+ ```python
146
+ """Example script demonstrating the usage of the service provided by OE Python Template."""
146
147
 
148
+ from dotenv import load_dotenv
149
+ from rich.console import Console
147
150
 
148
- ### Minimal Python Script:
151
+ from oe_python_template import Service
149
152
 
150
- ```python
151
- """
152
- Example script demonstrating the usage of OE Python Template.
153
+ console = Console()
153
154
 
154
- """
155
+ load_dotenv()
155
156
 
156
- print("Hello World")
157
+ message = Service.get_hello_world()
158
+ console.print(f"[blue]{message}[/blue]")
157
159
  ```
158
160
 
159
161
  [Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py) - [Read the reference documentation](https://oe-python-template.readthedocs.io/en/latest/reference.html)
160
162
 
163
+ ### Streamlit App
164
+
165
+ Serve the functionality provided by OE Python Template in the web by easily integrating the service into a Streamlit application.
166
+
167
+ [Try it out!](https://oe-python-template.streamlit.app) - [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/streamlit.py)
168
+
169
+ ... or serve the app locally
170
+ ```shell
171
+ uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
172
+ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
173
+ ```
174
+
161
175
  ## Jupyter Notebook
162
176
 
163
177
  [Show notebook code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
164
178
 
179
+ ... or run within VSCode
180
+
181
+ ```shell
182
+ uv sync --all-extras # Install ipykernel dependency part of the examples extra, see pyproject.toml
183
+ ```
184
+ Install the [Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
185
+
186
+ Click on `examples/jupyter.ipynb` in VSCode and run it.
187
+
165
188
  ## Command Line Interface (CLI)
166
189
 
167
190
  ### Run with [uvx](https://docs.astral.sh/uv/guides/tools/)
@@ -172,33 +195,47 @@ Show available commands:
172
195
  uvx oe-python-template --help
173
196
  ```
174
197
 
175
- Execute command:
198
+ Execute commands:
176
199
 
177
200
  ```shell
178
- uvx oe-python-template command "Lorem Ipsum"
201
+ uvx oe-python-template hello-world
202
+ uvx oe-python-template hello-world --json
203
+ uvx oe-python-template echo "Lorem Ipsum"
179
204
  ```
180
205
 
181
- ### Run with Docker
206
+ ### Environment
182
207
 
183
- Note: Replace ENV_KEY_TEST with Lorem Ipsum.
208
+ The service loads environment variables including support for .env files.
184
209
 
185
- Show available commands:
210
+ ```shell
211
+ cp .env.example .env # copy example file
212
+ echo "THE_VAR=MY_VALUE" > .env # overwrite with your values
213
+ ```
214
+
215
+ Now run the usage examples again.
216
+
217
+ ### Run with Docker
186
218
 
187
- ```bash
219
+ You can as well run the CLI within Docker.
220
+
221
+ ```shell
188
222
  docker run helmuthva/oe-python-template --help
223
+ docker run helmuthva/oe-python-template hello-world
224
+ docker run helmuthva/oe-python-template hello-world --json
225
+ docker run helmuthva/oe-python-template echo "Lorem"
189
226
  ```
190
227
 
191
228
  Execute command:
192
229
 
193
- ```bash
194
- docker run --env ENV_KEY_TEST=ENV_VALUE_TEST helmuthva/oe-python-template command "Lorem Ipsum"
230
+ ```shell
231
+ docker run --env THE_VAR=MY_VALUE helmuthva/oe-python-template echo "Lorem Ipsum"
195
232
  ```
196
233
 
197
234
  Or use docker compose
198
235
 
199
- File .env is passed through
236
+ The .env is passed through from the host to the Docker container.
200
237
 
201
- ```bash
238
+ ```shell
202
239
  docker compose up
203
240
  docker compose run oe-python-template --help
204
241
  ```
@@ -0,0 +1,9 @@
1
+ oe_python_template/__init__.py,sha256=XJAycUgDI2K8T0jVcXbaGfx2UAQJZbYcvJ_SYSqFyDA,315
2
+ oe_python_template/cli.py,sha256=5tUw70ffHL-ot0rM7g6BmsVhn9IKBQXwbWU0-n9-wb4,1319
3
+ oe_python_template/constants.py,sha256=Z1c06l5DeRuFxYVLHihHHTYvr8_Qh0nyzVKOe5X3ZNs,350
4
+ oe_python_template/service.py,sha256=p59ch0g81LpsRvL-m-vLPuk0Rf6EYsZfZJ_OCA9vWzQ,500
5
+ oe_python_template-0.0.2.dist-info/METADATA,sha256=5Coe2O9VH0L_GN44MtKYmvZzZYFJnbprumHMbxk0hKg,14814
6
+ oe_python_template-0.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
+ oe_python_template-0.0.2.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
8
+ oe_python_template-0.0.2.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
9
+ oe_python_template-0.0.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- oe_python_template/__init__.py,sha256=Fnde1pSaMfYkaxltxJhP0d4G5o314EmKJThX08th754,316
2
- oe_python_template/cli.py,sha256=JE64lWrsnUEZFLSIuehjDAScTJkBEKlqubaXjlJJcWU,1319
3
- oe_python_template/constants.py,sha256=Z1c06l5DeRuFxYVLHihHHTYvr8_Qh0nyzVKOe5X3ZNs,350
4
- oe_python_template/service.py,sha256=p59ch0g81LpsRvL-m-vLPuk0Rf6EYsZfZJ_OCA9vWzQ,500
5
- oe_python_template-0.0.1.dist-info/METADATA,sha256=wp6J-oZzcSAkI-drBmoA4Dmr3Qs_PPIgJxpHqZi2bW8,13362
6
- oe_python_template-0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
7
- oe_python_template-0.0.1.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
8
- oe_python_template-0.0.1.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
9
- oe_python_template-0.0.1.dist-info/RECORD,,