js-python-starter 2.4.0__tar.gz → 2.5.1__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.
- {js_python_starter-2.4.0/src/js_python_starter.egg-info → js_python_starter-2.5.1}/PKG-INFO +8 -1
- js_python_starter-2.5.1/pyproject.toml +28 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1/src/js_python_starter.egg-info}/PKG-INFO +8 -1
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/src/js_python_starter.egg-info/SOURCES.txt +4 -0
- js_python_starter-2.5.1/src/js_python_starter.egg-info/requires.txt +1 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/src/js_python_starter.egg-info/top_level.txt +1 -0
- js_python_starter-2.5.1/src/main.py +18 -0
- js_python_starter-2.5.1/src/util/__init__.py +0 -0
- js_python_starter-2.5.1/src/util/healthcheck.py +6 -0
- js_python_starter-2.5.1/src/util/logging.py +31 -0
- js_python_starter-2.4.0/pyproject.toml +0 -14
- js_python_starter-2.4.0/src/main.py +0 -6
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/LICENSE +0 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/README.md +0 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/setup.cfg +0 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/src/__init__.py +0 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/src/js_python_starter.egg-info/dependency_links.txt +0 -0
- {js_python_starter-2.4.0 → js_python_starter-2.5.1}/tests/test_startup.py +0 -0
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: js-python-starter
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: A starter project for quickly setting up new Python apps
|
|
5
|
+
Author-email: jnstockley <jnstockley@users.noreply.github.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/jnstockley/python-starter
|
|
7
|
+
Project-URL: Repository, https://github.com/jnstockley/python-starter.git
|
|
8
|
+
Project-URL: Issues, https://github.com/jnstockley/python-starter/issues
|
|
9
|
+
Keywords: starter,template,python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
5
11
|
Requires-Python: <4.0,>=3.13
|
|
6
12
|
Description-Content-Type: text/markdown
|
|
7
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: python-dotenv==1.2.1
|
|
8
15
|
Dynamic: license-file
|
|
9
16
|
|
|
10
17
|
# Python Starter
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "js-python-starter"
|
|
3
|
+
version = "2.5.1"
|
|
4
|
+
description = "A starter project for quickly setting up new Python apps"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13, <4.0"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "jnstockley", email = "jnstockley@users.noreply.github.com"}
|
|
10
|
+
]
|
|
11
|
+
keywords = ["starter", "template", "python"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"python-dotenv==1.2.1",
|
|
17
|
+
]
|
|
18
|
+
[project.urls]
|
|
19
|
+
Homepage = "https://github.com/jnstockley/python-starter"
|
|
20
|
+
Repository = "https://github.com/jnstockley/python-starter.git"
|
|
21
|
+
Issues = "https://github.com/jnstockley/python-starter/issues"
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = [
|
|
25
|
+
"pytest>=8.3.5",
|
|
26
|
+
"pytest-cov>=6.0.0",
|
|
27
|
+
"ruff>=0.13.2",
|
|
28
|
+
]
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: js-python-starter
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: A starter project for quickly setting up new Python apps
|
|
5
|
+
Author-email: jnstockley <jnstockley@users.noreply.github.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/jnstockley/python-starter
|
|
7
|
+
Project-URL: Repository, https://github.com/jnstockley/python-starter.git
|
|
8
|
+
Project-URL: Issues, https://github.com/jnstockley/python-starter/issues
|
|
9
|
+
Keywords: starter,template,python
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
5
11
|
Requires-Python: <4.0,>=3.13
|
|
6
12
|
Description-Content-Type: text/markdown
|
|
7
13
|
License-File: LICENSE
|
|
14
|
+
Requires-Dist: python-dotenv==1.2.1
|
|
8
15
|
Dynamic: license-file
|
|
9
16
|
|
|
10
17
|
# Python Starter
|
{js_python_starter-2.4.0 → js_python_starter-2.5.1}/src/js_python_starter.egg-info/SOURCES.txt
RENAMED
|
@@ -6,5 +6,9 @@ src/main.py
|
|
|
6
6
|
src/js_python_starter.egg-info/PKG-INFO
|
|
7
7
|
src/js_python_starter.egg-info/SOURCES.txt
|
|
8
8
|
src/js_python_starter.egg-info/dependency_links.txt
|
|
9
|
+
src/js_python_starter.egg-info/requires.txt
|
|
9
10
|
src/js_python_starter.egg-info/top_level.txt
|
|
11
|
+
src/util/__init__.py
|
|
12
|
+
src/util/healthcheck.py
|
|
13
|
+
src/util/logging.py
|
|
10
14
|
tests/test_startup.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python-dotenv==1.2.1
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
|
|
5
|
+
from util.healthcheck import healthcheck
|
|
6
|
+
from util.logging import logger
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
logger.info("Hello from python-starter!")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
if __name__ == "__main__":
|
|
14
|
+
load_dotenv()
|
|
15
|
+
if len(sys.argv) > 1 and sys.argv[1] == "healthcheck":
|
|
16
|
+
healthcheck()
|
|
17
|
+
else:
|
|
18
|
+
main()
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
log_level = os.getenv("LOG_LEVEL", "INFO").upper()
|
|
5
|
+
|
|
6
|
+
log_dir = os.path.join(os.path.dirname(__file__), "..", "..", "logs")
|
|
7
|
+
os.makedirs(log_dir, exist_ok=True)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
logger.setLevel(log_level)
|
|
12
|
+
|
|
13
|
+
# Create file handler
|
|
14
|
+
file_handler = logging.FileHandler(os.path.join(log_dir, "app.log"))
|
|
15
|
+
|
|
16
|
+
file_handler.setLevel(log_level)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Create console handler
|
|
20
|
+
console_handler = logging.StreamHandler()
|
|
21
|
+
console_handler.setLevel(log_level)
|
|
22
|
+
|
|
23
|
+
# Create formatter and add it to the handlers
|
|
24
|
+
formatter = logging.Formatter(
|
|
25
|
+
"%(asctime)s - %(filename)s:%(funcName)s:%(lineno)d - %(levelname)s - %(message)s"
|
|
26
|
+
)
|
|
27
|
+
file_handler.setFormatter(formatter)
|
|
28
|
+
console_handler.setFormatter(formatter)
|
|
29
|
+
|
|
30
|
+
logger.addHandler(file_handler)
|
|
31
|
+
logger.addHandler(console_handler)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "js-python-starter"
|
|
3
|
-
version = "2.4.0"
|
|
4
|
-
description = "A starter project for quickly setting up new Python apps"
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.13, <4.0"
|
|
7
|
-
dependencies = []
|
|
8
|
-
|
|
9
|
-
[dependency-groups]
|
|
10
|
-
dev = [
|
|
11
|
-
"pytest>=8.3.5",
|
|
12
|
-
"pytest-cov>=6.0.0",
|
|
13
|
-
"ruff>=0.13.2",
|
|
14
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|