oe-python-template-example 0.4.5__tar.gz → 0.4.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.
Files changed (40) hide show
  1. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/PKG-INFO +79 -152
  2. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/README.md +78 -151
  3. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/pyproject.toml +5 -5
  4. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/.gitignore +0 -0
  5. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/LICENSE +0 -0
  6. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/__init__.py +0 -0
  7. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/api.py +0 -0
  8. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/cli.py +0 -0
  9. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/constants.py +0 -0
  10. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/__init__.py +0 -0
  11. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_api.py +0 -0
  12. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_cli.py +0 -0
  13. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_constants.py +0 -0
  14. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_gui.py +0 -0
  15. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_models.py +0 -0
  16. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_service.py +0 -0
  17. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/hello/_settings.py +0 -0
  18. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/__init__.py +0 -0
  19. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/_api.py +0 -0
  20. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/_cli.py +0 -0
  21. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/_gui.py +0 -0
  22. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/_service.py +0 -0
  23. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/system/_settings.py +0 -0
  24. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/.vendored/bottle.py +0 -0
  25. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/__init__.py +0 -0
  26. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_api.py +0 -0
  27. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_cli.py +0 -0
  28. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_console.py +0 -0
  29. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_constants.py +0 -0
  30. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_di.py +0 -0
  31. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_gui.py +0 -0
  32. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_health.py +0 -0
  33. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_log.py +0 -0
  34. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_logfire.py +0 -0
  35. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_notebook.py +0 -0
  36. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_process.py +0 -0
  37. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_sentry.py +0 -0
  38. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_service.py +0 -0
  39. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/_settings.py +0 -0
  40. {oe_python_template_example-0.4.5 → oe_python_template_example-0.4.7}/src/oe_python_template_example/utils/boot.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.4.5
3
+ Version: 0.4.7
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/
@@ -119,133 +119,29 @@ Description-Content-Type: text/markdown
119
119
  ---
120
120
 
121
121
 
122
- Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
123
-
124
- ### Scaffolding
125
-
126
- This [Copier](https://copier.readthedocs.io/en/stable/) template enables you to quickly generate (scaffold) a Python package with fully functioning build and test automation:
127
-
128
- 1. Projects generated from this template can be [easily updated](https://copier.readthedocs.io/en/stable/updating/) to benefit from improvements and new features of the template.
129
- 2. During project generation, you can flexibly configure naming of the Python distribution, import package, main author, GitHub repository, organization, and many other aspects to match your specific requirements (see [copier.yml](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/copier.yml) for all available options).
130
-
131
- ### Development Infrastructure
132
-
133
- Projects generated with this template come with a comprehensive development toolchain and quality assurance framework that supports the entire software development lifecycle - from coding and testing to documentation, release management, and compliance auditing. This infrastructure automates routine tasks, enforces code quality standards, and streamlines the path to production:
134
-
135
- 1. Linting with [Ruff](https://github.com/astral-sh/ruff)
136
- 2. Static type checking with [mypy](https://mypy.readthedocs.io/en/stable/)
137
- 3. Complete set of [pre-commit](https://pre-commit.com/) hooks including [detect-secrets](https://github.com/Yelp/detect-secrets) and [pygrep](https://github.com/pre-commit/pygrep-hooks)
138
- 4. Unit and E2E testing with [pytest](https://docs.pytest.org/en/stable/) including parallel test execution
139
- 5. Matrix testing in multiple environments with [nox](https://nox.thea.codes/en/stable/)
140
- 6. Test coverage reported with [Codecov](https://codecov.io/) and published as release artifact
141
- 7. CI/CD pipeline automated with [GitHub Actions](https://github.com/features/actions)
142
- 8. CI/CD pipeline can be run locally with [act](https://github.com/nektos/act)
143
- 9. Code quality and security checks with [SonarQube](https://www.sonarsource.com/products/sonarcloud) and [GitHub CodeQL](https://codeql.github.com/)
144
- 10. Dependency monitoring and vulnerability scanning with [pip-audit](https://pypi.org/project/pip-audit/), [trivy](https://trivy.dev/latest/), [Renovate](https://github.com/renovatebot/renovate), and [GitHub Dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide)
145
- 11. Error monitoring and profiling with [Sentry](https://sentry.io/) (optional)
146
- 12. Logging and metrics with [Logfire](https://logfire.dev/) (optional)
147
- 13. Prepared for uptime monitoring with [betterstack](https://betterstack.com/) or alternatives
148
- 13. Licenses of dependencies extracted with [pip-licenses](https://pypi.org/project/pip-licenses/), matched with allow list, and published as release artifacts in CSV and JSON format for further compliance checks
149
- 14. Generation of attributions from extracted licenses
150
- 15. Software Bill of Materials (SBOM) generated in [CycloneDX](https://cyclonedx.org/) and [SPDX](https://spdx.dev/) formats with [cyclonedx-python](https://github.com/CycloneDX/cyclonedx-python) resp. [trivy](https://trivy.dev/latest/), published as release artifacts
151
- 16. Version and release management with [bump-my-version](https://callowayproject.github.io/bump-my-version/)
152
- 17. Changelog and release notes generated with [git-cliff](https://git-cliff.org/)
153
- 18. Documentation generated with [Sphinx](https://www.sphinx-doc.org/en/master/) including reference documentation for the library, CLI, and API
154
- 19. Documentation published to [Read The Docs](https://readthedocs.org/) including generation of PDF and single page HTML versions
155
- 20. Documentation including dynamic badges, setup instructions, contribution guide and security policy
156
- 21. Interactive OpenAPI specification with [Swagger](https://swagger.io/)
157
- 22. Python package published to [PyPI](https://pypi.org/)
158
- 23. Multi-stage build of fat and slim (no-extras) Docker images, app running nonroot
159
- 24. Mult-arch Docker images published to [Docker.io](https://hub.docker.com/) and [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) with [artifact attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds)
160
- 25. One-click development environments with [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) and [GitHub Codespaces](https://github.com/features/codespaces)
161
- 26. Settings for use with [VSCode](https://code.visualstudio.com/)
162
- 27. Settings and custom instructions for use with [GitHub Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
163
- 28. API deployed as serverless function to [Vercel](https://vercel.com/) (optional)
164
-
165
- ### Application Features
166
-
167
- Beyond development tooling, projects generated with this template include the code, documentation, and configuration of a fully functioning application and service. This reference implementation serves as a starting point for your own business logic with modern patterns and enterprise practices already in place:
168
-
169
- 1. Usable as library with "Hello" module exposing a simple service that can say "Hello, world!" and echo utterances.
170
- 2. Command-line interface (CLI) with [Typer](https://typer.tiangolo.com/)
171
- 2. Versioned webservice API with [FastAPI](https://fastapi.tiangolo.com/)
172
- 3. Comfortable command-line interface (CLI) with
173
- [Typer](https://typer.tiangolo.com/)
174
- 4. Cross-platform Graphical User Interface (GUI) with
175
- [NiceGUI](https://nicegui.io/) running in native window
176
- 5. [Interactive Jupyter notebook](https://jupyter.org/) and [reactive Marimo notebook](https://marimo.io/)
177
- 6. Simple Web UI with [Streamlit](https://streamlit.io/)
178
- 7. Validation and settings management with [pydantic](https://docs.pydantic.dev/)
179
- 8. Flexible logging and instrumentation, including support for [Sentry](https://sentry.io/) and [Logfire](https://logfire.dev/)
180
- 9. Modular architecture including auto-registration of services, CLI commands, API routes and GUI pages exposed by domain modules
181
- 10. System module providing aggregate health and info to the runtime, compiled settings, and further info provided by domain modules
182
- 11. Health and Info available via command, webservice API (info passsword protected) and GUI
183
- 12. Hello service demonstrates use of custom real time metrics collected via Logfire
184
- 13. Configuration to run the CLI and API in a Docker container including setup for [Docker Compose](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-docker-compose/)
185
-
186
- Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
187
-
188
- ## Generate a new project
189
-
190
- To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
191
-
192
- **Step 1**: Execute the following command to install or update tooling.
193
- ```shell
194
- # Install Homebrew, uv package manager, copier and further dev tools
195
- curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
196
- ```
197
-
198
- **Step 2**: [Create a repository on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository), clone to your local machine, and change into it's directory.
199
-
200
- **Step 3**: Execute the following command to generate a new project based on this template.
201
- ```shell
202
- # Ensure to stand in your freshly created git repository before executing this command
203
- copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
204
- ```
205
-
206
- **Step 4**: Execute the following commands to push your initial commit to GitHub.
207
- ```shell
208
- git add .
209
- git commit -m "chore: Initial commit"
210
- git push
211
- ```
212
-
213
- Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
214
-
215
- The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository. We will configure SonarQube and other services in the next step!
216
-
217
- Notes:
218
- 1. Check out [this manual](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key) on how to set up signed commits
219
-
220
- **Step 5**: Follow the [instructions](SERVICE_CONNECTIONS.md) to wire up
221
- external services such as CloudCov, SonarQube Cloud, Read The Docs, Docker.io, and Streamlit Community Cloud.
222
-
223
- **Step 6**: Release the first version of your project
224
- ```shell
225
- make bump
226
- ```
227
- Notes:
228
- 1. You can remove the above sections - from "Scaffolding" to this notes - post having successfully generated your project.
229
- 2. The following sections refer to the dummy application and service generated into the `tests` and `src` folder by this template.
230
- Use the documentation and code as inspiration, adapt to your business logic, or remove and start documenting and coding from scratch.
231
-
122
+ Example project scaffolded and kept up to date with OE Python Template
123
+ (oe-python-template).
232
124
 
233
125
  ## Overview
234
126
 
235
- Adding OE Python Template Example to your project as a dependency is easy. See below for usage examples.
127
+ Adding OE Python Template Example to your project as a dependency is easy. See
128
+ below for usage examples.
236
129
 
237
130
  ```shell
238
131
  uv add oe-python-template-example # add dependency to your project
239
132
  ```
240
133
 
241
- 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:
242
-
134
+ If you don't have uv installed follow
135
+ [these instructions](https://docs.astral.sh/uv/getting-started/installation/).
136
+ If you still prefer pip over the modern and fast package manager
137
+ [uv](https://github.com/astral-sh/uv), you can install the library like this:
243
138
 
244
139
  ```shell
245
140
  pip install oe-python-template-example # add dependency to your project
246
141
  ```
247
142
 
248
- Executing the command line interface (CLI) in an isolated Python environment is just as easy:
143
+ Executing the command line interface (CLI) in an isolated Python environment is
144
+ just as easy:
249
145
 
250
146
  ```shell
251
147
  uvx oe-python-template-example hello world # prints "Hello, world! [..]"
@@ -258,10 +154,13 @@ uvx oe-python-template-example system openapi # serves web API on por
258
154
  ```
259
155
 
260
156
  Notes:
261
- 1. The API is versioned, mounted at `/api/v1` resp. `/api/v2`
262
- 2. While serving the web 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.
263
- 3. Interactive documentation is provided at [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
264
157
 
158
+ 1. The API is versioned, mounted at `/api/v1` resp. `/api/v2`
159
+ 2. While serving the web API go to
160
+ [http://127.0.0.1:8000/api/v1/hello-world](http://127.0.0.1:8000/api/v1/hello-world)
161
+ to see the respons of the `hello-world` operation.
162
+ 3. Interactive documentation is provided at
163
+ [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
265
164
 
266
165
  The CLI provides extensive help:
267
166
 
@@ -274,27 +173,49 @@ uvx oe-python-template-example system serve --help
274
173
  uvx oe-python-template-example system openapi --help
275
174
  ```
276
175
 
277
-
278
176
  ## Operational Excellence
279
177
 
280
- This project is designed with operational excellence in mind, using modern Python tooling and practices. It includes:
281
-
282
- 1. Various examples demonstrating usage:
283
- a. [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
284
- b. [Streamlit web application](https://oe-python-template-example.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
285
- c. [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
286
- 2. Complete reference documentation [for the library](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html), [for the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html) and [for the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html) on Read the Docs
287
- 3. [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example) including unit and E2E tests (reported on Codecov)
288
- 4. 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/))
289
- 5. Compliant with modern linting and formatting standards (powered by [Ruff](https://github.com/astral-sh/ruff))
290
- 6. Up-to-date dependencies (monitored by [Renovate](https://github.com/renovatebot/renovate) and [Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
291
- 7. [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)
292
- 8. Additional code security checks using [CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
178
+ This project is designed with operational excellence in mind, using modern
179
+ Python tooling and practices. It includes:
180
+
181
+ 1. Various examples demonstrating usage: a.
182
+ [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
183
+ b.
184
+ [Streamlit web application](https://oe-python-template-example.streamlit.app/)
185
+ deployed on [Streamlit Community Cloud](https://streamlit.io/cloud) c.
186
+ [Jupyter](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.ipynb)
187
+ and
188
+ [Marimo](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.py)
189
+ notebook
190
+ 2. Complete reference documentation
191
+ [for the library](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html),
192
+ [for the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html)
193
+ and
194
+ [for the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html)
195
+ on Read the Docs
196
+ 3. [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example)
197
+ including unit and E2E tests (reported on Codecov)
198
+ 4. Matrix tested with
199
+ [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
200
+ to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
201
+ 5. Compliant with modern linting and formatting standards (powered by
202
+ [Ruff](https://github.com/astral-sh/ruff))
203
+ 6. Up-to-date dependencies (monitored by
204
+ [Renovate](https://github.com/renovatebot/renovate) and
205
+ [Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
206
+ 7. [A-grade code quality](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
207
+ in security, maintainability, and reliability with low technical debt and
208
+ codesmell (verified by SonarQube)
209
+ 8. Additional code security checks using
210
+ [CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
293
211
  9. [Security Policy](SECURITY.md)
294
212
  10. [License](LICENSE) compliant with the Open Source Initiative (OSI)
295
- 11. 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)
296
- 12. Setup for developing inside a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) included (supports VSCode and GitHub Codespaces)
297
-
213
+ 11. 1-liner for installation and execution of command line interface (CLI) via
214
+ [uv(x)](https://github.com/astral-sh/uv) or
215
+ [Docker](https://hub.docker.com/r/helmuthva/oe-python-template-example/tags)
216
+ 12. Setup for developing inside a
217
+ [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
218
+ included (supports VSCode and GitHub Codespaces)
298
219
 
299
220
  ## Usage Examples
300
221
 
@@ -306,29 +227,29 @@ The following examples run from source - clone this repository using
306
227
  ```python
307
228
  """Example script demonstrating the usage of the service provided by OE Python Template Example."""
308
229
 
309
- from dotenv import load_dotenv
310
230
  from rich.console import Console
311
231
 
312
232
  from oe_python_template_example.hello import Service
313
233
 
314
234
  console = Console()
315
235
 
316
- load_dotenv()
317
-
318
236
  message = Service.get_hello_world()
319
237
  console.print(f"[blue]{message}[/blue]")
320
238
  ```
321
239
 
322
- [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/lib_reference.html)
323
-
240
+ [Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) -
241
+ [Read the reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html)
324
242
 
325
243
  ### Streamlit App
326
244
 
327
- Serve the functionality provided by OE Python Template Example in the web by easily integrating the service into a Streamlit application.
245
+ Serve the functionality provided by OE Python Template Example in the web by
246
+ easily integrating the service into a Streamlit application.
328
247
 
329
- [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)
248
+ [Try it out!](https://oe-python-template-example.streamlit.app) -
249
+ [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/streamlit.py)
330
250
 
331
251
  ... or serve the app locally
252
+
332
253
  ```shell
333
254
  uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
334
255
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
@@ -336,8 +257,8 @@ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, o
336
257
 
337
258
  ### Vercel Serverless Function
338
259
 
339
- Serve the API as a [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
340
-
260
+ Serve the API as a
261
+ [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
341
262
 
342
263
  ## Notebooks
343
264
 
@@ -376,9 +297,11 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
376
297
 
377
298
  ... or edit interactively within VSCode
378
299
 
379
- Install the [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
300
+ Install the
301
+ [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
380
302
 
381
- 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).
303
+ Click on `examples/notebook.py` in VSCode and click on the caret next to the Run
304
+ icon above the code (looks like a pencil) > "Start in marimo editor" (edit).
382
305
 
383
306
  ... or without prior cloning of the repository
384
307
 
@@ -412,8 +335,9 @@ uvx oe-python-template-example system openapi --output-format=json
412
335
  uvx oe-python-template-example system serve
413
336
  ```
414
337
 
415
- See the [reference documentation of the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html) for detailed documentation of all CLI commands and options.
416
-
338
+ See the
339
+ [reference documentation of the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html)
340
+ for detailed documentation of all CLI commands and options.
417
341
 
418
342
  ### Environment
419
343
 
@@ -443,7 +367,8 @@ docker run helmuthva/oe-python-template-example system openapi --output-format=j
443
367
  docker run helmuthva/oe-python-template-example system serve
444
368
  ```
445
369
 
446
- The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
370
+ The default Docker image includes all extras. Additionally a slim image is
371
+ provided, with no extras. Run as follows
447
372
 
448
373
  ```shell
449
374
  docker run helmuthva/oe-python-template-example-slim --help
@@ -458,7 +383,8 @@ docker run --env OE_PYTHON_TEMPLATE_EXAMPLE_HELLO_LANGUAGE=en_US helmuthva/oe-py
458
383
  ```
459
384
 
460
385
  A docker compose stack is provided. Clone this repository using
461
- `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template-example.git` and enter the repository folder.
386
+ `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template-example.git`
387
+ and enter the repository folder.
462
388
 
463
389
  The .env is passed through from the host to the Docker container.
464
390
 
@@ -498,8 +424,9 @@ echo "Shutting down the API container ..."
498
424
  docker compose down
499
425
  ```
500
426
 
501
- * See the [reference documentation of the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html) for detailed documentation of all API operations and parameters.
502
-
427
+ - See the
428
+ [reference documentation of the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html)
429
+ for detailed documentation of all API operations and parameters.
503
430
 
504
431
  ## Extra: Lorem Ipsum
505
432
 
@@ -45,133 +45,29 @@
45
45
  ---
46
46
 
47
47
 
48
- Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
49
-
50
- ### Scaffolding
51
-
52
- This [Copier](https://copier.readthedocs.io/en/stable/) template enables you to quickly generate (scaffold) a Python package with fully functioning build and test automation:
53
-
54
- 1. Projects generated from this template can be [easily updated](https://copier.readthedocs.io/en/stable/updating/) to benefit from improvements and new features of the template.
55
- 2. During project generation, you can flexibly configure naming of the Python distribution, import package, main author, GitHub repository, organization, and many other aspects to match your specific requirements (see [copier.yml](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/copier.yml) for all available options).
56
-
57
- ### Development Infrastructure
58
-
59
- Projects generated with this template come with a comprehensive development toolchain and quality assurance framework that supports the entire software development lifecycle - from coding and testing to documentation, release management, and compliance auditing. This infrastructure automates routine tasks, enforces code quality standards, and streamlines the path to production:
60
-
61
- 1. Linting with [Ruff](https://github.com/astral-sh/ruff)
62
- 2. Static type checking with [mypy](https://mypy.readthedocs.io/en/stable/)
63
- 3. Complete set of [pre-commit](https://pre-commit.com/) hooks including [detect-secrets](https://github.com/Yelp/detect-secrets) and [pygrep](https://github.com/pre-commit/pygrep-hooks)
64
- 4. Unit and E2E testing with [pytest](https://docs.pytest.org/en/stable/) including parallel test execution
65
- 5. Matrix testing in multiple environments with [nox](https://nox.thea.codes/en/stable/)
66
- 6. Test coverage reported with [Codecov](https://codecov.io/) and published as release artifact
67
- 7. CI/CD pipeline automated with [GitHub Actions](https://github.com/features/actions)
68
- 8. CI/CD pipeline can be run locally with [act](https://github.com/nektos/act)
69
- 9. Code quality and security checks with [SonarQube](https://www.sonarsource.com/products/sonarcloud) and [GitHub CodeQL](https://codeql.github.com/)
70
- 10. Dependency monitoring and vulnerability scanning with [pip-audit](https://pypi.org/project/pip-audit/), [trivy](https://trivy.dev/latest/), [Renovate](https://github.com/renovatebot/renovate), and [GitHub Dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide)
71
- 11. Error monitoring and profiling with [Sentry](https://sentry.io/) (optional)
72
- 12. Logging and metrics with [Logfire](https://logfire.dev/) (optional)
73
- 13. Prepared for uptime monitoring with [betterstack](https://betterstack.com/) or alternatives
74
- 13. Licenses of dependencies extracted with [pip-licenses](https://pypi.org/project/pip-licenses/), matched with allow list, and published as release artifacts in CSV and JSON format for further compliance checks
75
- 14. Generation of attributions from extracted licenses
76
- 15. Software Bill of Materials (SBOM) generated in [CycloneDX](https://cyclonedx.org/) and [SPDX](https://spdx.dev/) formats with [cyclonedx-python](https://github.com/CycloneDX/cyclonedx-python) resp. [trivy](https://trivy.dev/latest/), published as release artifacts
77
- 16. Version and release management with [bump-my-version](https://callowayproject.github.io/bump-my-version/)
78
- 17. Changelog and release notes generated with [git-cliff](https://git-cliff.org/)
79
- 18. Documentation generated with [Sphinx](https://www.sphinx-doc.org/en/master/) including reference documentation for the library, CLI, and API
80
- 19. Documentation published to [Read The Docs](https://readthedocs.org/) including generation of PDF and single page HTML versions
81
- 20. Documentation including dynamic badges, setup instructions, contribution guide and security policy
82
- 21. Interactive OpenAPI specification with [Swagger](https://swagger.io/)
83
- 22. Python package published to [PyPI](https://pypi.org/)
84
- 23. Multi-stage build of fat and slim (no-extras) Docker images, app running nonroot
85
- 24. Mult-arch Docker images published to [Docker.io](https://hub.docker.com/) and [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) with [artifact attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds)
86
- 25. One-click development environments with [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) and [GitHub Codespaces](https://github.com/features/codespaces)
87
- 26. Settings for use with [VSCode](https://code.visualstudio.com/)
88
- 27. Settings and custom instructions for use with [GitHub Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot)
89
- 28. API deployed as serverless function to [Vercel](https://vercel.com/) (optional)
90
-
91
- ### Application Features
92
-
93
- Beyond development tooling, projects generated with this template include the code, documentation, and configuration of a fully functioning application and service. This reference implementation serves as a starting point for your own business logic with modern patterns and enterprise practices already in place:
94
-
95
- 1. Usable as library with "Hello" module exposing a simple service that can say "Hello, world!" and echo utterances.
96
- 2. Command-line interface (CLI) with [Typer](https://typer.tiangolo.com/)
97
- 2. Versioned webservice API with [FastAPI](https://fastapi.tiangolo.com/)
98
- 3. Comfortable command-line interface (CLI) with
99
- [Typer](https://typer.tiangolo.com/)
100
- 4. Cross-platform Graphical User Interface (GUI) with
101
- [NiceGUI](https://nicegui.io/) running in native window
102
- 5. [Interactive Jupyter notebook](https://jupyter.org/) and [reactive Marimo notebook](https://marimo.io/)
103
- 6. Simple Web UI with [Streamlit](https://streamlit.io/)
104
- 7. Validation and settings management with [pydantic](https://docs.pydantic.dev/)
105
- 8. Flexible logging and instrumentation, including support for [Sentry](https://sentry.io/) and [Logfire](https://logfire.dev/)
106
- 9. Modular architecture including auto-registration of services, CLI commands, API routes and GUI pages exposed by domain modules
107
- 10. System module providing aggregate health and info to the runtime, compiled settings, and further info provided by domain modules
108
- 11. Health and Info available via command, webservice API (info passsword protected) and GUI
109
- 12. Hello service demonstrates use of custom real time metrics collected via Logfire
110
- 13. Configuration to run the CLI and API in a Docker container including setup for [Docker Compose](https://docs.docker.com/get-started/docker-concepts/the-basics/what-is-docker-compose/)
111
-
112
- Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example) for what's generated out of the box.
113
-
114
- ## Generate a new project
115
-
116
- To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
117
-
118
- **Step 1**: Execute the following command to install or update tooling.
119
- ```shell
120
- # Install Homebrew, uv package manager, copier and further dev tools
121
- curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
122
- ```
123
-
124
- **Step 2**: [Create a repository on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository), clone to your local machine, and change into it's directory.
125
-
126
- **Step 3**: Execute the following command to generate a new project based on this template.
127
- ```shell
128
- # Ensure to stand in your freshly created git repository before executing this command
129
- copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
130
- ```
131
-
132
- **Step 4**: Execute the following commands to push your initial commit to GitHub.
133
- ```shell
134
- git add .
135
- git commit -m "chore: Initial commit"
136
- git push
137
- ```
138
-
139
- Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
140
-
141
- The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository. We will configure SonarQube and other services in the next step!
142
-
143
- Notes:
144
- 1. Check out [this manual](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key) on how to set up signed commits
145
-
146
- **Step 5**: Follow the [instructions](SERVICE_CONNECTIONS.md) to wire up
147
- external services such as CloudCov, SonarQube Cloud, Read The Docs, Docker.io, and Streamlit Community Cloud.
148
-
149
- **Step 6**: Release the first version of your project
150
- ```shell
151
- make bump
152
- ```
153
- Notes:
154
- 1. You can remove the above sections - from "Scaffolding" to this notes - post having successfully generated your project.
155
- 2. The following sections refer to the dummy application and service generated into the `tests` and `src` folder by this template.
156
- Use the documentation and code as inspiration, adapt to your business logic, or remove and start documenting and coding from scratch.
157
-
48
+ Example project scaffolded and kept up to date with OE Python Template
49
+ (oe-python-template).
158
50
 
159
51
  ## Overview
160
52
 
161
- Adding OE Python Template Example to your project as a dependency is easy. See below for usage examples.
53
+ Adding OE Python Template Example to your project as a dependency is easy. See
54
+ below for usage examples.
162
55
 
163
56
  ```shell
164
57
  uv add oe-python-template-example # add dependency to your project
165
58
  ```
166
59
 
167
- 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:
168
-
60
+ If you don't have uv installed follow
61
+ [these instructions](https://docs.astral.sh/uv/getting-started/installation/).
62
+ If you still prefer pip over the modern and fast package manager
63
+ [uv](https://github.com/astral-sh/uv), you can install the library like this:
169
64
 
170
65
  ```shell
171
66
  pip install oe-python-template-example # add dependency to your project
172
67
  ```
173
68
 
174
- Executing the command line interface (CLI) in an isolated Python environment is just as easy:
69
+ Executing the command line interface (CLI) in an isolated Python environment is
70
+ just as easy:
175
71
 
176
72
  ```shell
177
73
  uvx oe-python-template-example hello world # prints "Hello, world! [..]"
@@ -184,10 +80,13 @@ uvx oe-python-template-example system openapi # serves web API on por
184
80
  ```
185
81
 
186
82
  Notes:
187
- 1. The API is versioned, mounted at `/api/v1` resp. `/api/v2`
188
- 2. While serving the web 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.
189
- 3. Interactive documentation is provided at [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
190
83
 
84
+ 1. The API is versioned, mounted at `/api/v1` resp. `/api/v2`
85
+ 2. While serving the web API go to
86
+ [http://127.0.0.1:8000/api/v1/hello-world](http://127.0.0.1:8000/api/v1/hello-world)
87
+ to see the respons of the `hello-world` operation.
88
+ 3. Interactive documentation is provided at
89
+ [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
191
90
 
192
91
  The CLI provides extensive help:
193
92
 
@@ -200,27 +99,49 @@ uvx oe-python-template-example system serve --help
200
99
  uvx oe-python-template-example system openapi --help
201
100
  ```
202
101
 
203
-
204
102
  ## Operational Excellence
205
103
 
206
- This project is designed with operational excellence in mind, using modern Python tooling and practices. It includes:
207
-
208
- 1. Various examples demonstrating usage:
209
- a. [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
210
- b. [Streamlit web application](https://oe-python-template-example.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
211
- c. [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
212
- 2. Complete reference documentation [for the library](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html), [for the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html) and [for the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html) on Read the Docs
213
- 3. [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example) including unit and E2E tests (reported on Codecov)
214
- 4. 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/))
215
- 5. Compliant with modern linting and formatting standards (powered by [Ruff](https://github.com/astral-sh/ruff))
216
- 6. Up-to-date dependencies (monitored by [Renovate](https://github.com/renovatebot/renovate) and [Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
217
- 7. [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)
218
- 8. Additional code security checks using [CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
104
+ This project is designed with operational excellence in mind, using modern
105
+ Python tooling and practices. It includes:
106
+
107
+ 1. Various examples demonstrating usage: a.
108
+ [Simple Python script](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py)
109
+ b.
110
+ [Streamlit web application](https://oe-python-template-example.streamlit.app/)
111
+ deployed on [Streamlit Community Cloud](https://streamlit.io/cloud) c.
112
+ [Jupyter](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.ipynb)
113
+ and
114
+ [Marimo](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.py)
115
+ notebook
116
+ 2. Complete reference documentation
117
+ [for the library](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html),
118
+ [for the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html)
119
+ and
120
+ [for the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html)
121
+ on Read the Docs
122
+ 3. [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example)
123
+ including unit and E2E tests (reported on Codecov)
124
+ 4. Matrix tested with
125
+ [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
126
+ to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
127
+ 5. Compliant with modern linting and formatting standards (powered by
128
+ [Ruff](https://github.com/astral-sh/ruff))
129
+ 6. Up-to-date dependencies (monitored by
130
+ [Renovate](https://github.com/renovatebot/renovate) and
131
+ [Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
132
+ 7. [A-grade code quality](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
133
+ in security, maintainability, and reliability with low technical debt and
134
+ codesmell (verified by SonarQube)
135
+ 8. Additional code security checks using
136
+ [CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
219
137
  9. [Security Policy](SECURITY.md)
220
138
  10. [License](LICENSE) compliant with the Open Source Initiative (OSI)
221
- 11. 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)
222
- 12. Setup for developing inside a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) included (supports VSCode and GitHub Codespaces)
223
-
139
+ 11. 1-liner for installation and execution of command line interface (CLI) via
140
+ [uv(x)](https://github.com/astral-sh/uv) or
141
+ [Docker](https://hub.docker.com/r/helmuthva/oe-python-template-example/tags)
142
+ 12. Setup for developing inside a
143
+ [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
144
+ included (supports VSCode and GitHub Codespaces)
224
145
 
225
146
  ## Usage Examples
226
147
 
@@ -232,29 +153,29 @@ The following examples run from source - clone this repository using
232
153
  ```python
233
154
  """Example script demonstrating the usage of the service provided by OE Python Template Example."""
234
155
 
235
- from dotenv import load_dotenv
236
156
  from rich.console import Console
237
157
 
238
158
  from oe_python_template_example.hello import Service
239
159
 
240
160
  console = Console()
241
161
 
242
- load_dotenv()
243
-
244
162
  message = Service.get_hello_world()
245
163
  console.print(f"[blue]{message}[/blue]")
246
164
  ```
247
165
 
248
- [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/lib_reference.html)
249
-
166
+ [Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) -
167
+ [Read the reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/lib_reference.html)
250
168
 
251
169
  ### Streamlit App
252
170
 
253
- Serve the functionality provided by OE Python Template Example in the web by easily integrating the service into a Streamlit application.
171
+ Serve the functionality provided by OE Python Template Example in the web by
172
+ easily integrating the service into a Streamlit application.
254
173
 
255
- [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)
174
+ [Try it out!](https://oe-python-template-example.streamlit.app) -
175
+ [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/streamlit.py)
256
176
 
257
177
  ... or serve the app locally
178
+
258
179
  ```shell
259
180
  uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
260
181
  uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
@@ -262,8 +183,8 @@ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, o
262
183
 
263
184
  ### Vercel Serverless Function
264
185
 
265
- Serve the API as a [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
266
-
186
+ Serve the API as a
187
+ [serverless function on Vercel](https://oe-python-template-example.vercel.app/)
267
188
 
268
189
  ## Notebooks
269
190
 
@@ -302,9 +223,11 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
302
223
 
303
224
  ... or edit interactively within VSCode
304
225
 
305
- Install the [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
226
+ Install the
227
+ [Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
306
228
 
307
- 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).
229
+ Click on `examples/notebook.py` in VSCode and click on the caret next to the Run
230
+ icon above the code (looks like a pencil) > "Start in marimo editor" (edit).
308
231
 
309
232
  ... or without prior cloning of the repository
310
233
 
@@ -338,8 +261,9 @@ uvx oe-python-template-example system openapi --output-format=json
338
261
  uvx oe-python-template-example system serve
339
262
  ```
340
263
 
341
- See the [reference documentation of the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html) for detailed documentation of all CLI commands and options.
342
-
264
+ See the
265
+ [reference documentation of the CLI](https://oe-python-template-example.readthedocs.io/en/latest/cli_reference.html)
266
+ for detailed documentation of all CLI commands and options.
343
267
 
344
268
  ### Environment
345
269
 
@@ -369,7 +293,8 @@ docker run helmuthva/oe-python-template-example system openapi --output-format=j
369
293
  docker run helmuthva/oe-python-template-example system serve
370
294
  ```
371
295
 
372
- The default Docker image includes all extras. Additionally a slim image is provided, with no extras. Run as follows
296
+ The default Docker image includes all extras. Additionally a slim image is
297
+ provided, with no extras. Run as follows
373
298
 
374
299
  ```shell
375
300
  docker run helmuthva/oe-python-template-example-slim --help
@@ -384,7 +309,8 @@ docker run --env OE_PYTHON_TEMPLATE_EXAMPLE_HELLO_LANGUAGE=en_US helmuthva/oe-py
384
309
  ```
385
310
 
386
311
  A docker compose stack is provided. Clone this repository using
387
- `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template-example.git` and enter the repository folder.
312
+ `git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template-example.git`
313
+ and enter the repository folder.
388
314
 
389
315
  The .env is passed through from the host to the Docker container.
390
316
 
@@ -424,8 +350,9 @@ echo "Shutting down the API container ..."
424
350
  docker compose down
425
351
  ```
426
352
 
427
- * See the [reference documentation of the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html) for detailed documentation of all API operations and parameters.
428
-
353
+ - See the
354
+ [reference documentation of the API](https://oe-python-template-example.readthedocs.io/en/latest/api_reference_v1.html)
355
+ for detailed documentation of all API operations and parameters.
429
356
 
430
357
  ## Extra: Lorem Ipsum
431
358
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template-example"
3
- version = "0.4.5"
3
+ version = "0.4.7"
4
4
  description = "🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template)."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -85,11 +85,11 @@ dependencies = [
85
85
 
86
86
  [project.optional-dependencies]
87
87
  examples = [
88
- "streamlit>=1.44.1",
89
88
  "marimo>=0.13.0",
90
- "jupyter>=1.1.1",
91
- "jinja2>=3.1.6",
92
89
  "matplotlib>=3.10.1",
90
+ "jinja2>=3.1.6",
91
+ "jupyter>=1.1.1",
92
+ "streamlit>=1.44.1",
93
93
  ]
94
94
 
95
95
  [dependency-groups]
@@ -281,7 +281,7 @@ source = ["src/"]
281
281
 
282
282
 
283
283
  [tool.bumpversion]
284
- current_version = "0.4.5"
284
+ current_version = "0.4.7"
285
285
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
286
286
  serialize = ["{major}.{minor}.{patch}"]
287
287
  search = "{current_version}"