oe-python-template-example 0.1.12__py3-none-any.whl → 0.1.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/METADATA +65 -86
- {oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/RECORD +5 -5
- {oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/WHEEL +0 -0
- {oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/entry_points.txt +0 -0
- {oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/licenses/LICENSE +0 -0
{oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: oe-python-template-example
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.14
|
4
4
|
Summary: 🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
|
5
5
|
Project-URL: Homepage, https://oe-python-template-example.readthedocs.io/en/latest/
|
6
6
|
Project-URL: Documentation, https://oe-python-template-example.readthedocs.io/en/latest/
|
@@ -66,13 +66,14 @@ Description-Content-Type: text/markdown
|
|
66
66
|
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
|
67
67
|
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/actions/workflows/test-and-report.yml)
|
68
68
|
[](https://oe-python-template-example.readthedocs.io/en/latest/)
|
69
|
-
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
|
70
|
-
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot)
|
71
69
|
[](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
72
70
|
[](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
73
71
|
[](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
74
72
|
[](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
75
73
|
[](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
74
|
+
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
|
75
|
+
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot)
|
76
|
+
[](https://renovatebot.com/)
|
76
77
|
[](https://codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example)
|
77
78
|
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
|
78
79
|
[](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
|
@@ -100,64 +101,13 @@ Description-Content-Type: text/markdown
|
|
100
101
|
---
|
101
102
|
|
102
103
|
|
103
|
-
Example project scaffolded and kept up to date with OE Python Template
|
104
|
+
Example project scaffolded and kept up to date with OE Python Template
|
105
|
+
(oe-python-template).
|
104
106
|
|
105
107
|
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
|
-
|
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
108
|
|
130
|
-
|
131
|
-
|
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.
|
109
|
+
1. Dummy CLI application and service demonstrating example usage of the
|
110
|
+
directory structure and build pipeline generated by oe-python-template
|
161
111
|
|
162
112
|
## Overview
|
163
113
|
|
@@ -167,13 +117,17 @@ Adding OE Python Template Example to your project as a dependency is easy.
|
|
167
117
|
uv add oe-python-template-example # add dependency to your project
|
168
118
|
```
|
169
119
|
|
170
|
-
If you don't have uv installed follow
|
120
|
+
If you don't have uv installed follow
|
121
|
+
[these instructions](https://docs.astral.sh/uv/getting-started/installation/).
|
122
|
+
If you still prefer pip over the modern and fast package manager
|
123
|
+
[uv](https://github.com/astral-sh/uv), you can install the library like this:
|
171
124
|
|
172
125
|
```shell
|
173
126
|
pip install oe-python-template-example # add dependency to your project
|
174
127
|
```
|
175
128
|
|
176
|
-
Executing the command line interface (CLI) in an isolated Python environment is
|
129
|
+
Executing the command line interface (CLI) in an isolated Python environment is
|
130
|
+
just as easy:
|
177
131
|
|
178
132
|
```shell
|
179
133
|
uvx oe-python-template-example hello-world # prints "Hello, world! [..]"
|
@@ -182,8 +136,8 @@ uvx oe-python-template-example serve --port=4711 # serves webservice API on port
|
|
182
136
|
```
|
183
137
|
|
184
138
|
Notes:
|
185
|
-
* The API is versioned, mounted at
|
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
|
139
|
+
* The API is versioned, mounted at `/api/v1` resp. `/api/v2`
|
140
|
+
* 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
141
|
* Interactive documentation is provided at [http://127.0.0.1:8000/api/docs](http://127.0.0.1:8000/api/docs)
|
188
142
|
|
189
143
|
|
@@ -197,27 +151,44 @@ uvx oe-python-template-example openapi --help
|
|
197
151
|
uvx oe-python-template-example serve --help
|
198
152
|
```
|
199
153
|
|
200
|
-
|
201
154
|
## Operational Excellence
|
202
155
|
|
203
|
-
This project is designed with operational excellence in mind, using modern
|
156
|
+
This project is designed with operational excellence in mind, using modern
|
157
|
+
Python tooling and practices. It includes:
|
204
158
|
|
205
|
-
|
159
|
+
- Various examples demonstrating usage:
|
206
160
|
- [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/)
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
161
|
+
- [Streamlit web application](https://oe-python-template-example.streamlit.app/)
|
162
|
+
deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
|
163
|
+
- [Jupyter](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.ipynb)
|
164
|
+
and
|
165
|
+
[Marimo](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/notebook.py)
|
166
|
+
notebook
|
167
|
+
- [Complete reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html)
|
168
|
+
on Read the Docs
|
169
|
+
- [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template-example)
|
170
|
+
including unit and E2E tests (reported on Codecov)
|
171
|
+
- Matrix tested with
|
172
|
+
[multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/noxfile.py)
|
173
|
+
to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
|
174
|
+
- Compliant with modern linting and formatting standards (powered by
|
175
|
+
[Ruff](https://github.com/astral-sh/ruff))
|
176
|
+
- Up-to-date dependencies (monitored by
|
177
|
+
[Renovate](https://github.com/renovatebot/renovate) and
|
178
|
+
[GitHub Dependabot](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/dependabot))
|
179
|
+
- [A-grade code quality](https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template-example)
|
180
|
+
in security, maintainability, and reliability with low technical debt and
|
181
|
+
codesmell (verified by SonarQube)
|
182
|
+
- Additional code security checks using
|
183
|
+
[GitHub CodeQL](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/security/code-scanning)
|
184
|
+
- [Security Policy](SECURITY.md)
|
185
|
+
- [License](LICENSE) compliant with the Open Source Initiative (OSI)
|
186
|
+
- 1-liner for installation and execution of command line interface (CLI) via
|
187
|
+
[uv(x)](https://github.com/astral-sh/uv) or
|
188
|
+
[Docker](https://hub.docker.com/r/helmuthva/oe-python-template-example/tags)
|
189
|
+
- Setup for developing inside a
|
190
|
+
[devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
|
191
|
+
included (supports VSCode and GitHub Codespaces)
|
221
192
|
|
222
193
|
## Usage Examples
|
223
194
|
|
@@ -242,15 +213,19 @@ message = Service.get_hello_world()
|
|
242
213
|
console.print(f"[blue]{message}[/blue]")
|
243
214
|
```
|
244
215
|
|
245
|
-
[Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) -
|
216
|
+
[Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/script.py) -
|
217
|
+
[Read the reference documentation](https://oe-python-template-example.readthedocs.io/en/latest/reference.html)
|
246
218
|
|
247
219
|
### Streamlit App
|
248
220
|
|
249
|
-
Serve the functionality provided by OE Python Template Example in the web by
|
221
|
+
Serve the functionality provided by OE Python Template Example in the web by
|
222
|
+
easily integrating the service into a Streamlit application.
|
250
223
|
|
251
|
-
[Try it out!](https://oe-python-template-example.streamlit.app) -
|
224
|
+
[Try it out!](https://oe-python-template-example.streamlit.app) -
|
225
|
+
[Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template-example/blob/main/examples/streamlit.py)
|
252
226
|
|
253
227
|
... or serve the app locally
|
228
|
+
|
254
229
|
```shell
|
255
230
|
uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
|
256
231
|
uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
|
@@ -267,7 +242,9 @@ uv run streamlit run examples/streamlit.py # Serve on localhost:8501, o
|
|
267
242
|
```shell
|
268
243
|
uv sync --all-extras # Install dependencies required for examples such as Juypyter kernel, see pyproject.toml
|
269
244
|
```
|
270
|
-
|
245
|
+
|
246
|
+
Install the
|
247
|
+
[Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
|
271
248
|
|
272
249
|
Click on `examples/notebook.ipynb` in VSCode and run it.
|
273
250
|
|
@@ -291,9 +268,11 @@ uv run marimo edit examples/notebook.py --watch # Edit on localhost:2718, op
|
|
291
268
|
|
292
269
|
... or edit interactively within VSCode
|
293
270
|
|
294
|
-
Install the
|
271
|
+
Install the
|
272
|
+
[Marimo extension for VSCode](https://marketplace.visualstudio.com/items?itemName=marimo-team.vscode-marimo)
|
295
273
|
|
296
|
-
Click on `examples/notebook.py` in VSCode and click on the caret next to the Run
|
274
|
+
Click on `examples/notebook.py` in VSCode and click on the caret next to the Run
|
275
|
+
icon above the code (looks like a pencil) > "Start in marimo editor" (edit).
|
297
276
|
|
298
277
|
## Command Line Interface (CLI)
|
299
278
|
|
@@ -370,7 +349,7 @@ curl http://127.0.0.1:8000/api/v2/docs
|
|
370
349
|
|
371
350
|
## Extra: Lorem Ipsum
|
372
351
|
|
373
|
-
|
352
|
+
Nothing yet
|
374
353
|
|
375
354
|
|
376
355
|
## Further Reading
|
{oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/RECORD
RENAMED
@@ -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.
|
7
|
-
oe_python_template_example-0.1.
|
8
|
-
oe_python_template_example-0.1.
|
9
|
-
oe_python_template_example-0.1.
|
10
|
-
oe_python_template_example-0.1.
|
6
|
+
oe_python_template_example-0.1.14.dist-info/METADATA,sha256=HYg-GQcbIo4h5KbZP-qDlxWmN9Qq1M_GMHlT50vKoUQ,21003
|
7
|
+
oe_python_template_example-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
+
oe_python_template_example-0.1.14.dist-info/entry_points.txt,sha256=S2eCPB45b1Wgj_GsDRFAN-e4h7dBA5UPxT8od98erDE,82
|
9
|
+
oe_python_template_example-0.1.14.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
|
10
|
+
oe_python_template_example-0.1.14.dist-info/RECORD,,
|
{oe_python_template_example-0.1.12.dist-info → oe_python_template_example-0.1.14.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|