oe-python-template-example 0.1.12__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.12
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/
@@ -100,64 +100,13 @@ Description-Content-Type: text/markdown
100
100
  ---
101
101
 
102
102
 
103
- 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).
104
105
 
105
106
  Use Cases:
106
- 1) Fast and easy to use project setup
107
- 2) Consistent update of already scaffolded projects to benefit from new and improved features.
108
- 3) Dummy CLI application and service demonstrating example usage of the generated directory structure and build pipeline
109
107
 
110
- ## Scaffolding
111
-
112
- **Step 1**: Install uv package manager and copier
113
- ```shell
114
- if [[ "$OSTYPE" == "darwin"* ]]; then # Install dependencies for macOS X
115
- if ! command -v brew &> /dev/null; then ## Install Homebrew if not present
116
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
117
- fi
118
- elif [[ "$OSTYPE" == "linux-gnu"* ]]; then # Install dependencies for Linux
119
- sudo apt-get update -y && sudo apt-get install curl -y # Install curl
120
- fi
121
- if ! command -v uvx &> /dev/null; then # Install uv package manager if not present
122
- curl -LsSf https://astral.sh/uv/install.sh | sh
123
- source $HOME/.local/bin/env
124
- fi
125
- uv tool install copier # Install copier as global tool
126
- ```
127
-
128
- **Step 2**: Now create an empty repository on GitHubm, clone to your local machine, and change into it's directory.
129
-
130
- **Step 3**: Scaffold the project
131
- ```shell
132
- copier copy gh:helmut-hoffer-von-ankershoffen/oe-python-template .
133
- ```
134
- **Step 4**: Setup the local environment
135
-
136
- ```shell
137
- uv run nox -s setup_dev
138
- ```
139
-
140
- **Step 5**: Perform initial commit and push
141
- ```shell
142
- git add .
143
- git commit -m "feat: Initial commit"
144
- git push
145
- ```
146
-
147
- Visit your GitHub repository and check the Actions tab. The CI workflow should fail at the SonarQube step,
148
- as this external service is not yet configured for our new repository.
149
-
150
- **Step 6**: Follow the [instructions](SERVICE_CONNECTIONS.md) to wire up
151
- external services such as Cloudcov, SonarQube Cloud, Read The Docs, Docker.io, GHCR.io and Streamlit Community Cloud.
152
-
153
- **Step 7**: Release the first versions
154
- ```shell
155
- ./bump
156
- ```
157
- Notes:
158
- * You can remove this section post having successfully scafolded your project.
159
- * The following sections refer to the dummy application and service provided by this template.
160
- 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
161
110
 
162
111
  ## Overview
163
112
 
@@ -167,13 +116,17 @@ Adding OE Python Template Example to your project as a dependency is easy.
167
116
  uv add oe-python-template-example # add dependency to your project
168
117
  ```
169
118
 
170
- 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:
171
123
 
172
124
  ```shell
173
125
  pip install oe-python-template-example # add dependency to your project
174
126
  ```
175
127
 
176
- 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:
177
130
 
178
131
  ```shell
179
132
  uvx oe-python-template-example hello-world # prints "Hello, world! [..]"
@@ -182,10 +135,13 @@ uvx oe-python-template-example serve --port=4711 # serves webservice API on port
182
135
  ```
183
136
 
184
137
  Notes:
185
- * The API is versioned, mounted at ```/api/v1``` resp. ```/api/v2```
186
- * 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.
187
- * Interactive documentation is provided at [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
188
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)
189
145
 
190
146
  The CLI provides extensive help:
191
147
 
@@ -197,27 +153,44 @@ uvx oe-python-template-example openapi --help
197
153
  uvx oe-python-template-example serve --help
198
154
  ```
199
155
 
200
-
201
156
  ## Operational Excellence
202
157
 
203
- 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:
204
160
 
205
- * Various examples demonstrating usage:
161
+ - Various examples demonstrating usage:
206
162
  - [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
207
- - [Streamlit web application](https://oe-python-template-example.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
208
- - [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
209
- * [Complete reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html) on Read the Docs
210
- * [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example) including unit and E2E tests (reported on Codecov)
211
- * 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/))
212
- * Compliant with modern linting and formatting standards (powered by [Ruff](https://github.com/astral-sh/ruff))
213
- * Up-to-date dependencies (monitored by [Renovate](https://github.com/renovatebot/renovate) and [GitHub Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
214
- * [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 codesmell (verified by SonarQube)
215
- * Additional code security checks using [GitHub CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
216
- * [Security Policy](SECURITY.md)
217
- * [License](LICENSE) compliant with the Open Source Initiative (OSI)
218
- * 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)
219
- * Setup for developing inside a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) included (supports VSCode and GitHub Codespaces)
220
-
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)
221
194
 
222
195
  ## Usage Examples
223
196
 
@@ -242,15 +215,19 @@ message = Service.get_hello_world()
242
215
  console.print(f"[blue]{message}[/blue]")
243
216
  ```
244
217
 
245
- [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)
246
220
 
247
221
  ### Streamlit App
248
222
 
249
- 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.
250
225
 
251
- [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)
252
228
 
253
229
  ... or serve the app locally
230
+
254
231
  ```shell
255
232
  uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
256
233
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
@@ -267,7 +244,9 @@ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, o
267
244
  ```shell
268
245
  uv sync --all-extras # Install dependencies required for examples such as Juypyter kernel, see pyproject.toml
269
246
  ```
270
- 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)
271
250
 
272
251
  Click on `examples/notebook.ipynb` in VSCode and run it.
273
252
 
@@ -291,9 +270,11 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
291
270
 
292
271
  ... or edit interactively within VSCode
293
272
 
294
- 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)
295
275
 
296
- 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).
297
278
 
298
279
  ## Command Line Interface (CLI)
299
280
 
@@ -370,7 +351,7 @@ curl http://127.0.0.1:8000/api/v2/docs
370
351
 
371
352
  ## Extra: Lorem Ipsum
372
353
 
373
- Dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam.
354
+ Nothing yet
374
355
 
375
356
 
376
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.12.dist-info/METADATA,sha256=AkqqKcHiHLTNI84mbQORnywMJa6Pq6XauTe8_YYU09w,22969
7
- oe_python_template_example-0.1.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- oe_python_template_example-0.1.12.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
9
- oe_python_template_example-0.1.12.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
10
- oe_python_template_example-0.1.12.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,,