oe-python-template-example 0.1.11__py3-none-any.whl → 0.1.13__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.1.11
3
+ Version: 0.1.13
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/
@@ -66,6 +66,8 @@ Description-Content-Type: text/markdown
66
66
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/oe-python-template-example.svg?logo=python&color=204361&labelColor=1E2933)](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
67
67
  [![CI](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions/workflows/test-and-report.yml/badge.svg)](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions/workflows/test-and-report.yml)
68
68
  [![Read the Docs](https://img.shields.io/readthedocs/oe-python-template-example)](https://oe-python-template-example.readthedocs.io/en/latest/)
69
+ [![CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions/workflows/codeql.yml/badge.svg)](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
70
+ [![Dependabot](https://img.shields.io/badge/dependabot-active-brightgreen?style=flat-square&logo=dependabot)](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot)
69
71
  [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=helmut-hoffer-von-ankershoffen_oe-python-template-example&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
70
72
  [![Security](https://sonarcloud.io/api/project_badges/measure?project=helmut-hoffer-von-ankershoffen_oe-python-template-example&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
71
73
  [![Maintainability](https://sonarcloud.io/api/project_badges/measure?project=helmut-hoffer-von-ankershoffen_oe-python-template-example&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
@@ -98,64 +100,13 @@ Description-Content-Type: text/markdown
98
100
  ---
99
101
 
100
102
 
101
- Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
103
+ Example project scaffolded and kept up to date with OE Python Template
104
+ (oe-python-template).
102
105
 
103
106
  Use Cases:
104
- 1) Fast and easy to use project setup
105
- 2) Consistent update of already scaffolded projects to benefit from new and improved features.
106
- 3) Dummy CLI application and service demonstrating example usage of the generated directory structure and build pipeline
107
107
 
108
- ## Scaffolding
109
-
110
- **Step 1**: Install uv package manager and copier
111
- ```shell
112
- if [[ "$OSTYPE" == "darwin"* ]]; then # Install dependencies for macOS X
113
- if ! command -v brew &> /dev/null; then ## Install Homebrew if not present
114
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
115
- fi
116
- elif [[ "$OSTYPE" == "linux-gnu"* ]]; then # Install dependencies for Linux
117
- sudo apt-get update -y && sudo apt-get install curl -y # Install curl
118
- fi
119
- if ! command -v uvx &> /dev/null; then # Install uv package manager if not present
120
- curl -LsSf https://astral.sh/uv/install.sh | sh
121
- source $HOME/.local/bin/env
122
- fi
123
- uv tool install copier # Install copier as global tool
124
- ```
125
-
126
- **Step 2**: Now create an empty repository on GitHubm, clone to your local machine, and change into it's directory.
127
-
128
- **Step 3**: Scaffold the project
129
- ```shell
130
- copier copy gh:helmut-hoffer-von-ankershoffen/oe-python-template .
131
- ```
132
- **Step 4**: Setup the local environment
133
-
134
- ```shell
135
- uv run nox -s setup_dev
136
- ```
137
-
138
- **Step 5**: Perform initial commit and push
139
- ```shell
140
- git add .
141
- git commit -m "feat: Initial commit"
142
- git push
143
- ```
144
-
145
- Visit your GitHub repository and check the Actions tab. The CI workflow should fail at the SonarQube step,
146
- as this external service is not yet configured for our new repository.
147
-
148
- **Step 6**: Follow the [SERVICE_INSTRUCTIONS.md](instructions) to wire up
149
- external services such as Cloudcov, SonarQube Cloud, Read The Docs, Docker.io, GHCR.io and Streamlit Community Cloud.
150
-
151
- **Step 7**: Release the first versions
152
- ```shell
153
- ./bump
154
- ```
155
- Notes:
156
- * You can remove this section post having successfully scafolded your project.
157
- * The following sections refer to the dummy application and service provided by this template.
158
- Use them as inspiration and adapt them to your own project.
108
+ 1. Dummy CLI application and service demonstrating example usage of the
109
+ directory structure and build pipeline generated by oe-python-template
159
110
 
160
111
  ## Overview
161
112
 
@@ -165,13 +116,17 @@ Adding OE Python Template Example to your project as a dependency is easy.
165
116
  uv add oe-python-template-example # add dependency to your project
166
117
  ```
167
118
 
168
- If you don't have uv installed follow [these instructions](https://docs.astral.sh/uv/getting-started/installation/). If you still prefer pip over the modern and fast package manager [uv](https://github.com/astral-sh/uv), you can install the library like this:
119
+ If you don't have uv installed follow
120
+ [these instructions](https://docs.astral.sh/uv/getting-started/installation/).
121
+ If you still prefer pip over the modern and fast package manager
122
+ [uv](https://github.com/astral-sh/uv), you can install the library like this:
169
123
 
170
124
  ```shell
171
125
  pip install oe-python-template-example # add dependency to your project
172
126
  ```
173
127
 
174
- Executing the command line interface (CLI) in an isolated Python environment is just as easy:
128
+ Executing the command line interface (CLI) in an isolated Python environment is
129
+ just as easy:
175
130
 
176
131
  ```shell
177
132
  uvx oe-python-template-example hello-world # prints "Hello, world! [..]"
@@ -180,10 +135,13 @@ uvx oe-python-template-example serve --port=4711 # serves webservice API on port
180
135
  ```
181
136
 
182
137
  Notes:
183
- * The API is versioned, mounted at ```/api/v1``` resp. ```/api/v2```
184
- * While serving the webservice API go to [http://127.0.0.1:8000/api/v1/hello-world](http://127.0.0.1:8000/api/v1/hello-world) to see the respons of the ```hello-world``` operation.
185
- * Interactive documentation is provided at [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
186
138
 
139
+ - The API is versioned, mounted at `/api/v1` resp. `/api/v2`
140
+ - While serving the webservice API go to
141
+ [http://127.0.0.1:8000/api/v1/hello-world](http://127.0.0.1:8000/api/v1/hello-world)
142
+ to see the respons of the `hello-world` operation.
143
+ - Interactive documentation is provided at
144
+ [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
187
145
 
188
146
  The CLI provides extensive help:
189
147
 
@@ -195,24 +153,44 @@ uvx oe-python-template-example openapi --help
195
153
  uvx oe-python-template-example serve --help
196
154
  ```
197
155
 
198
-
199
156
  ## Operational Excellence
200
157
 
201
- This project is designed with operational excellence in mind, using modern Python tooling and practices. It includes:
158
+ This project is designed with operational excellence in mind, using modern
159
+ Python tooling and practices. It includes:
202
160
 
203
- * Various examples demonstrating usage:
161
+ - Various examples demonstrating usage:
204
162
  - [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
205
- - [Streamlit web application](https://oe-python-template-example.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
206
- - [Jupyter](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.ipynb) and [Marimo](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.py) notebook
207
- * [Complete reference documenation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html) on Read the Docs
208
- * [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example) including unit and E2E tests (reported on Codecov)
209
- * Matrix tested with [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py) to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
210
- * Compliant with modern linting and formatting standards (powered by [Ruff](https://github.com/astral-sh/ruff))
211
- * Up-to-date dependencies (monitored by [Renovate](https://github.com/renovatebot/renovate))
212
- * [A-grade code quality](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example) in security, maintainability, and reliability with low technical debt and low codesmell (verified by SonarQube)
213
- * 1-liner for installation and execution of command line interface (CLI) via [uv(x)](https://github.com/astral-sh/uv) or [Docker](https://hub.docker.com/r/helmuthva/oe-python-template-example/tags)
214
- * Setup for developing inside a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) included (supports VSCode and GitHub Codespaces)
215
-
163
+ - [Streamlit web application](https://oe-python-template-example.streamlit.app/)
164
+ deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
165
+ - [Jupyter](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.ipynb)
166
+ and
167
+ [Marimo](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.py)
168
+ notebook
169
+ - [Complete reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html)
170
+ on Read the Docs
171
+ - [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example)
172
+ including unit and E2E tests (reported on Codecov)
173
+ - Matrix tested with
174
+ [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
175
+ to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
176
+ - Compliant with modern linting and formatting standards (powered by
177
+ [Ruff](https://github.com/astral-sh/ruff))
178
+ - Up-to-date dependencies (monitored by
179
+ [Renovate](https://github.com/renovatebot/renovate) and
180
+ [GitHub Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
181
+ - [A-grade code quality](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
182
+ in security, maintainability, and reliability with low technical debt and
183
+ codesmell (verified by SonarQube)
184
+ - Additional code security checks using
185
+ [GitHub CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
186
+ - [Security Policy](SECURITY.md)
187
+ - [License](LICENSE) compliant with the Open Source Initiative (OSI)
188
+ - 1-liner for installation and execution of command line interface (CLI) via
189
+ [uv(x)](https://github.com/astral-sh/uv) or
190
+ [Docker](https://hub.docker.com/r/helmuthva/oe-python-template-example/tags)
191
+ - Setup for developing inside a
192
+ [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
193
+ included (supports VSCode and GitHub Codespaces)
216
194
 
217
195
  ## Usage Examples
218
196
 
@@ -237,15 +215,19 @@ message = Service.get_hello_world()
237
215
  console.print(f"[blue]{message}[/blue]")
238
216
  ```
239
217
 
240
- [Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) - [Read the reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html)
218
+ [Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) -
219
+ [Read the reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html)
241
220
 
242
221
  ### Streamlit App
243
222
 
244
- Serve the functionality provided by OE Python Template Example in the web by easily integrating the service into a Streamlit application.
223
+ Serve the functionality provided by OE Python Template Example in the web by
224
+ easily integrating the service into a Streamlit application.
245
225
 
246
- [Try it out!](https://oe-python-template-example.streamlit.app) - [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/streamlit.py)
226
+ [Try it out!](https://oe-python-template-example.streamlit.app) -
227
+ [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/streamlit.py)
247
228
 
248
229
  ... or serve the app locally
230
+
249
231
  ```shell
250
232
  uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
251
233
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
@@ -262,7 +244,9 @@ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, o
262
244
  ```shell
263
245
  uv sync --all-extras # Install dependencies required for examples such as Juypyter kernel, see pyproject.toml
264
246
  ```
265
- Install the [Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
247
+
248
+ Install the
249
+ [Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
266
250
 
267
251
  Click on `examples/notebook.ipynb` in VSCode and run it.
268
252
 
@@ -286,9 +270,11 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
286
270
 
287
271
  ... or edit interactively within VSCode
288
272
 
289
- Install the [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
273
+ Install the
274
+ [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
290
275
 
291
- 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).
276
+ Click on `examples/notebook.py` in VSCode and click on the caret next to the Run
277
+ icon above the code (looks like a pencil) > "Start in marimo editor" (edit).
292
278
 
293
279
  ## Command Line Interface (CLI)
294
280
 
@@ -365,7 +351,7 @@ curl http://127.0.0.1:8000/api/v2/docs
365
351
 
366
352
  ## Extra: Lorem Ipsum
367
353
 
368
- Dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam.
354
+ Nothing yet
369
355
 
370
356
 
371
357
  ## Further Reading
@@ -3,8 +3,8 @@ oe_python_template_example/api.py,sha256=vN2a10Ph4pffsXBx9TpFe0g39lZOE-5dJat2VhM
3
3
  oe_python_template_example/cli.py,sha256=BHuDCrzYkvJYDdvk06KwkK_sKQx7h7hhRiO0peQMM1s,3474
4
4
  oe_python_template_example/constants.py,sha256=6uQHr2CRgzWQWhUQCRRKiPuFhzKB2iblZk3dIRQ5dDc,358
5
5
  oe_python_template_example/service.py,sha256=XlCrklSRy8_YaYvlVYiDFPUubHHm-J8BPx2f7_niGG4,760
6
- oe_python_template_example-0.1.11.dist-info/METADATA,sha256=B8t_20UTRfXlG9JR3LHQWc7YXvv9qAGKAQy-Wc298nA,22154
7
- oe_python_template_example-0.1.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- oe_python_template_example-0.1.11.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
9
- oe_python_template_example-0.1.11.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
10
- oe_python_template_example-0.1.11.dist-info/RECORD,,
6
+ oe_python_template_example-0.1.13.dist-info/METADATA,sha256=ibFW6Vj6SaUabnFFqK_Y9eT6lz37Nrgj13hEr3mPvj8,20898
7
+ oe_python_template_example-0.1.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ oe_python_template_example-0.1.13.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
9
+ oe_python_template_example-0.1.13.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
10
+ oe_python_template_example-0.1.13.dist-info/RECORD,,