oe-python-template 0.7.0__tar.gz → 0.7.2__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.
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/PKG-INFO +31 -28
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/README.md +30 -27
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/pyproject.toml +2 -2
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/.gitignore +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/LICENSE +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/__init__.py +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/api.py +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/cli.py +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/constants.py +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/models.py +0 -0
- {oe_python_template-0.7.0 → oe_python_template-0.7.2}/src/oe_python_template/service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oe-python-template
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
|
5
5
|
Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
|
|
6
6
|
Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
|
|
@@ -154,48 +154,32 @@ Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-templ
|
|
|
154
154
|
|
|
155
155
|
## Generate a new project
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
To generate a new project, follow these steps:
|
|
157
|
+
To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
|
|
159
158
|
|
|
160
|
-
**Step 1**:
|
|
159
|
+
**Step 1**: Execute the following command to install or update tooling.
|
|
161
160
|
```shell
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
fi
|
|
165
|
-
if ! command -v brew &> /dev/null; then # https://brew.sh/
|
|
166
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
167
|
-
brew update # Update Homebrew bundles
|
|
168
|
-
fi
|
|
169
|
-
which uv &> /dev/null || brew install uv # https://docs.astral.sh/uv/
|
|
170
|
-
which git &> /dev/null || brew install git # https://git-scm.com/
|
|
171
|
-
which gpg &> /dev/null || brew install gnupg # https://gnupg.org/
|
|
172
|
-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
|
|
173
|
-
which jq &> /dev/null || brew install jq # https://jqlang.org/
|
|
174
|
-
which libxml2 &> /dev/null || brew install libxml2 # https://en.wikipedia.org/wiki/Libxml2
|
|
175
|
-
which act &> /dev/null || brew install act # https://nektosact.com/
|
|
176
|
-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
|
|
177
|
-
if [[ "$OSTYPE" == "darwin"* ]]; then # Install macOS specifics
|
|
178
|
-
which pinentry-mac &> /dev/null || brew install gnupg # https://github.com/GPGTools/pinentry
|
|
179
|
-
fi
|
|
180
|
-
uv tool install copier # https://copier.readthedocs.io/en/stable/
|
|
161
|
+
# Install Homebrew, uv package manager, copier and further dev tools
|
|
162
|
+
curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
|
|
181
163
|
```
|
|
182
164
|
|
|
183
165
|
**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.
|
|
184
166
|
|
|
185
|
-
**Step 3**:
|
|
167
|
+
**Step 3**: Execute the following command to generate a new project based on this template.
|
|
186
168
|
```shell
|
|
187
|
-
#
|
|
169
|
+
# Ensure to stand in a git repository before executing the next command
|
|
188
170
|
copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
|
|
189
171
|
```
|
|
190
172
|
|
|
191
|
-
**Step 4**:
|
|
173
|
+
**Step 4**: Execute the following commands to push your initial commit to GitHub.
|
|
192
174
|
```shell
|
|
193
175
|
git add .
|
|
194
176
|
git commit -m "chore: Initial commit"
|
|
195
177
|
git push
|
|
196
178
|
```
|
|
197
179
|
|
|
198
|
-
|
|
180
|
+
Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
|
|
181
|
+
|
|
182
|
+
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!
|
|
199
183
|
|
|
200
184
|
Notes:
|
|
201
185
|
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
|
|
@@ -416,11 +400,30 @@ docker compose run oe-python-template echo "Lorem"
|
|
|
416
400
|
docker compose run oe-python-template echo "Lorem" --json
|
|
417
401
|
docker compose run oe-python-template openapi
|
|
418
402
|
docker compose run oe-python-template openapi --output-format=json
|
|
419
|
-
|
|
403
|
+
echo "Running OE Python Template's API container as a daemon ..."
|
|
404
|
+
docker compose up -d
|
|
405
|
+
echo "Waiting for the API server to start ..."
|
|
406
|
+
sleep 5
|
|
407
|
+
echo "Checking health of v1 API ..."
|
|
408
|
+
curl http://127.0.0.1:8000/api/v1/healthz
|
|
409
|
+
echo ""
|
|
410
|
+
echo "Saying hello world with v1 API ..."
|
|
420
411
|
curl http://127.0.0.1:8000/api/v1/hello-world
|
|
412
|
+
echo ""
|
|
413
|
+
echo "Swagger docs of v1 API ..."
|
|
421
414
|
curl http://127.0.0.1:8000/api/v1/docs
|
|
415
|
+
echo ""
|
|
416
|
+
echo "Checking health of v2 API ..."
|
|
417
|
+
curl http://127.0.0.1:8000/api/v2/healthz
|
|
418
|
+
echo ""
|
|
419
|
+
echo "Saying hello world with v1 API ..."
|
|
422
420
|
curl http://127.0.0.1:8000/api/v2/hello-world
|
|
421
|
+
echo ""
|
|
422
|
+
echo "Swagger docs of v2 API ..."
|
|
423
423
|
curl http://127.0.0.1:8000/api/v2/docs
|
|
424
|
+
echo ""
|
|
425
|
+
echo "Shutting down the API container ..."
|
|
426
|
+
docker compose down
|
|
424
427
|
```
|
|
425
428
|
|
|
426
429
|
## Extra: Lorem Ipsum
|
|
@@ -93,48 +93,32 @@ Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-templ
|
|
|
93
93
|
|
|
94
94
|
## Generate a new project
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
To generate a new project, follow these steps:
|
|
96
|
+
To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
|
|
98
97
|
|
|
99
|
-
**Step 1**:
|
|
98
|
+
**Step 1**: Execute the following command to install or update tooling.
|
|
100
99
|
```shell
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
fi
|
|
104
|
-
if ! command -v brew &> /dev/null; then # https://brew.sh/
|
|
105
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
106
|
-
brew update # Update Homebrew bundles
|
|
107
|
-
fi
|
|
108
|
-
which uv &> /dev/null || brew install uv # https://docs.astral.sh/uv/
|
|
109
|
-
which git &> /dev/null || brew install git # https://git-scm.com/
|
|
110
|
-
which gpg &> /dev/null || brew install gnupg # https://gnupg.org/
|
|
111
|
-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
|
|
112
|
-
which jq &> /dev/null || brew install jq # https://jqlang.org/
|
|
113
|
-
which libxml2 &> /dev/null || brew install libxml2 # https://en.wikipedia.org/wiki/Libxml2
|
|
114
|
-
which act &> /dev/null || brew install act # https://nektosact.com/
|
|
115
|
-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
|
|
116
|
-
if [[ "$OSTYPE" == "darwin"* ]]; then # Install macOS specifics
|
|
117
|
-
which pinentry-mac &> /dev/null || brew install gnupg # https://github.com/GPGTools/pinentry
|
|
118
|
-
fi
|
|
119
|
-
uv tool install copier # https://copier.readthedocs.io/en/stable/
|
|
100
|
+
# Install Homebrew, uv package manager, copier and further dev tools
|
|
101
|
+
curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
|
|
120
102
|
```
|
|
121
103
|
|
|
122
104
|
**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.
|
|
123
105
|
|
|
124
|
-
**Step 3**:
|
|
106
|
+
**Step 3**: Execute the following command to generate a new project based on this template.
|
|
125
107
|
```shell
|
|
126
|
-
#
|
|
108
|
+
# Ensure to stand in a git repository before executing the next command
|
|
127
109
|
copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
|
|
128
110
|
```
|
|
129
111
|
|
|
130
|
-
**Step 4**:
|
|
112
|
+
**Step 4**: Execute the following commands to push your initial commit to GitHub.
|
|
131
113
|
```shell
|
|
132
114
|
git add .
|
|
133
115
|
git commit -m "chore: Initial commit"
|
|
134
116
|
git push
|
|
135
117
|
```
|
|
136
118
|
|
|
137
|
-
|
|
119
|
+
Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
|
|
120
|
+
|
|
121
|
+
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!
|
|
138
122
|
|
|
139
123
|
Notes:
|
|
140
124
|
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
|
|
@@ -355,11 +339,30 @@ docker compose run oe-python-template echo "Lorem"
|
|
|
355
339
|
docker compose run oe-python-template echo "Lorem" --json
|
|
356
340
|
docker compose run oe-python-template openapi
|
|
357
341
|
docker compose run oe-python-template openapi --output-format=json
|
|
358
|
-
|
|
342
|
+
echo "Running OE Python Template's API container as a daemon ..."
|
|
343
|
+
docker compose up -d
|
|
344
|
+
echo "Waiting for the API server to start ..."
|
|
345
|
+
sleep 5
|
|
346
|
+
echo "Checking health of v1 API ..."
|
|
347
|
+
curl http://127.0.0.1:8000/api/v1/healthz
|
|
348
|
+
echo ""
|
|
349
|
+
echo "Saying hello world with v1 API ..."
|
|
359
350
|
curl http://127.0.0.1:8000/api/v1/hello-world
|
|
351
|
+
echo ""
|
|
352
|
+
echo "Swagger docs of v1 API ..."
|
|
360
353
|
curl http://127.0.0.1:8000/api/v1/docs
|
|
354
|
+
echo ""
|
|
355
|
+
echo "Checking health of v2 API ..."
|
|
356
|
+
curl http://127.0.0.1:8000/api/v2/healthz
|
|
357
|
+
echo ""
|
|
358
|
+
echo "Saying hello world with v1 API ..."
|
|
361
359
|
curl http://127.0.0.1:8000/api/v2/hello-world
|
|
360
|
+
echo ""
|
|
361
|
+
echo "Swagger docs of v2 API ..."
|
|
362
362
|
curl http://127.0.0.1:8000/api/v2/docs
|
|
363
|
+
echo ""
|
|
364
|
+
echo "Shutting down the API container ..."
|
|
365
|
+
docker compose down
|
|
363
366
|
```
|
|
364
367
|
|
|
365
368
|
## Extra: Lorem Ipsum
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "oe-python-template"
|
|
3
|
-
version = "0.7.
|
|
3
|
+
version = "0.7.2"
|
|
4
4
|
description = "🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -253,7 +253,7 @@ source = ["src/"]
|
|
|
253
253
|
|
|
254
254
|
|
|
255
255
|
[tool.bumpversion]
|
|
256
|
-
current_version = "0.7.
|
|
256
|
+
current_version = "0.7.2"
|
|
257
257
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
258
258
|
serialize = ["{major}.{minor}.{patch}"]
|
|
259
259
|
search = "{current_version}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|