oe-python-template 0.10.8__tar.gz → 0.10.10__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.10.8 → oe_python_template-0.10.10}/PKG-INFO +1 -1
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/pyproject.toml +2 -2
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/api.py +5 -1
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/__init__.py +2 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_constants.py +11 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/.gitignore +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/LICENSE +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/README.md +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/__init__.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/cli.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/constants.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/__init__.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_api.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_cli.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_constants.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_models.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_service.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_settings.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/__init__.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_api.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_cli.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_service.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_settings.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_api.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_cli.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_console.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_di.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_health.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_log.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_logfire.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_process.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_sentry.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_service.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_settings.py +0 -0
- {oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/boot.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oe-python-template
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.10
|
|
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/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "oe-python-template"
|
|
3
|
-
version = "0.10.
|
|
3
|
+
version = "0.10.10"
|
|
4
4
|
description = "🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [{ name = "Helmut Hoffer von Ankershoffen", email = "helmuthva@gmail.com" }]
|
|
@@ -276,7 +276,7 @@ source = ["src/"]
|
|
|
276
276
|
|
|
277
277
|
|
|
278
278
|
[tool.bumpversion]
|
|
279
|
-
current_version = "0.10.
|
|
279
|
+
current_version = "0.10.10"
|
|
280
280
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
281
281
|
serialize = ["{major}.{minor}.{patch}"]
|
|
282
282
|
search = "{current_version}"
|
|
@@ -13,6 +13,7 @@ from .utils import (
|
|
|
13
13
|
VersionedAPIRouter,
|
|
14
14
|
__author_email__,
|
|
15
15
|
__author_name__,
|
|
16
|
+
__base__url__,
|
|
16
17
|
__documentation__url__,
|
|
17
18
|
__repository_url__,
|
|
18
19
|
locate_implementations,
|
|
@@ -26,6 +27,9 @@ CONTACT_EMAIL = __author_email__
|
|
|
26
27
|
CONTACT_URL = __repository_url__
|
|
27
28
|
TERMS_OF_SERVICE_URL = __documentation__url__
|
|
28
29
|
|
|
30
|
+
API_BASE_URL = __base__url__
|
|
31
|
+
if not API_BASE_URL:
|
|
32
|
+
API_BASE_URL = f"http://{UVICORN_HOST}:{UVICORN_PORT}"
|
|
29
33
|
|
|
30
34
|
app = FastAPI(
|
|
31
35
|
root_path="/api",
|
|
@@ -42,7 +46,7 @@ app = FastAPI(
|
|
|
42
46
|
"description": f"API version {version.lstrip('v')}, check link on the right",
|
|
43
47
|
"externalDocs": {
|
|
44
48
|
"description": "sub-docs",
|
|
45
|
-
"url": f"
|
|
49
|
+
"url": f"{API_BASE_URL}/api/{version}/docs",
|
|
46
50
|
},
|
|
47
51
|
}
|
|
48
52
|
for version, _ in API_VERSIONS.items()
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/__init__.py
RENAMED
|
@@ -6,6 +6,7 @@ from ._console import console
|
|
|
6
6
|
from ._constants import (
|
|
7
7
|
__author_email__,
|
|
8
8
|
__author_name__,
|
|
9
|
+
__base__url__,
|
|
9
10
|
__documentation__url__,
|
|
10
11
|
__env__,
|
|
11
12
|
__env_file__,
|
|
@@ -39,6 +40,7 @@ __all__ = [
|
|
|
39
40
|
"VersionedAPIRouter",
|
|
40
41
|
"__author_email__",
|
|
41
42
|
"__author_name__",
|
|
43
|
+
"__base__url__",
|
|
42
44
|
"__documentation__url__",
|
|
43
45
|
"__env__",
|
|
44
46
|
"__env_file__",
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_constants.py
RENAMED
|
@@ -5,6 +5,10 @@ import sys
|
|
|
5
5
|
from importlib import metadata
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
+
from dotenv import load_dotenv
|
|
9
|
+
|
|
10
|
+
load_dotenv()
|
|
11
|
+
|
|
8
12
|
__project_name__ = __name__.split(".")[0]
|
|
9
13
|
__project_path__ = str(Path(__file__).parent.parent.parent)
|
|
10
14
|
__version__ = metadata.version(__project_name__)
|
|
@@ -21,6 +25,13 @@ env_file_path = os.getenv(f"{__project_name__.upper()}_ENV_FILE")
|
|
|
21
25
|
if env_file_path:
|
|
22
26
|
__env_file__.insert(2, Path(env_file_path))
|
|
23
27
|
|
|
28
|
+
vercel_base_url = os.getenv("VERCEL_URL", None)
|
|
29
|
+
if vercel_base_url:
|
|
30
|
+
vercel_base_url = "https://" + vercel_base_url
|
|
31
|
+
__base__url__ = os.getenv(__project_name__.upper() + "_BASE_URL", None)
|
|
32
|
+
if not __base__url__ and vercel_base_url:
|
|
33
|
+
__base__url__ = vercel_base_url
|
|
34
|
+
|
|
24
35
|
|
|
25
36
|
def get_project_url_by_label(prefix: str) -> str:
|
|
26
37
|
"""Get labeled Project-URL.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/constants.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/__init__.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_api.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_cli.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_constants.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_models.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_service.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/hello/_settings.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/__init__.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_api.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_cli.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_service.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/system/_settings.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_api.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_cli.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_console.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_di.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_health.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_log.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_logfire.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_process.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_sentry.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_service.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/_settings.py
RENAMED
|
File without changes
|
{oe_python_template-0.10.8 → oe_python_template-0.10.10}/src/oe_python_template/utils/boot.py
RENAMED
|
File without changes
|