python-base-toolkit 1.1.2__tar.gz → 1.2.0__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.
- {python_base_toolkit-1.1.2/python_base_toolkit.egg-info → python_base_toolkit-1.2.0}/PKG-INFO +1 -8
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/pyproject.toml +7 -7
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/base_structures/base_pydantic_model.py +4 -5
- python_base_toolkit-1.2.0/python_base_toolkit/ci/task_files/lint.yml +9 -0
- python_base_toolkit-1.2.0/python_base_toolkit/consts/units/__init__.py +6 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/data_serialization.py +16 -17
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0/python_base_toolkit.egg-info}/PKG-INFO +1 -8
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/requires.txt +0 -7
- python_base_toolkit-1.1.2/python_base_toolkit/ci/task_files/lint.yml +0 -11
- python_base_toolkit-1.1.2/python_base_toolkit/consts/units/__init__.py +0 -7
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/LICENSE +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/MANIFEST.in +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/README.md +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/Taskfile.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/base_structures/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/base_structures/base_enum.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/default.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/dependencies.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/deploy.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/docker.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/includes.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/install.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/vars.yml +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/general.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/operating_system.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/units/binary_units.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/units/time_units.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/telemetry.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/timer.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/instances/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/instances/instance_manager.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/scripts/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/scripts/remove_build_files.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/__init__.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/date_time.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/execute.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/file_utils.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/generate_id.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/logo.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/network.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/path_utils.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/pretty_print.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/pycache.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/random_utils.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/shorten_url.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/venv_details.py +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/SOURCES.txt +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/dependency_links.txt +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/not-zip-safe +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/top_level.txt +0 -0
- {python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/setup.cfg +0 -0
{python_base_toolkit-1.1.2/python_base_toolkit.egg-info → python_base_toolkit-1.2.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-base-toolkit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A Python package for managing pytest plugins.
|
|
5
5
|
Author: Avi Zaguri
|
|
6
6
|
License: MIT
|
|
@@ -16,21 +16,14 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
16
16
|
Requires-Python: >=3.12
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: build>=1.3.0
|
|
20
|
-
Requires-Dist: colorlog>=6.10.1
|
|
21
19
|
Requires-Dist: custom-python-logger>=4.0.0
|
|
22
20
|
Requires-Dist: pandas>=2.3.3
|
|
23
|
-
Requires-Dist: pathlib>=1.0.1
|
|
24
|
-
Requires-Dist: pre-commit>=4.5.0
|
|
25
21
|
Requires-Dist: pydantic>=2.12.5
|
|
26
22
|
Requires-Dist: pyfiglet>=1.0.4
|
|
27
23
|
Requires-Dist: python-dotenv>=1.2.1
|
|
28
24
|
Requires-Dist: pyyaml>=6.0.3
|
|
29
25
|
Requires-Dist: requests>=2.32.5
|
|
30
|
-
Requires-Dist: setuptools>=80.9.0
|
|
31
26
|
Requires-Dist: tqdm>=4.67.1
|
|
32
|
-
Requires-Dist: twine>=6.2.0
|
|
33
|
-
Requires-Dist: wheel>=0.45.1
|
|
34
27
|
Dynamic: license-file
|
|
35
28
|
|
|
36
29
|

|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-base-toolkit"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.2.0"
|
|
8
8
|
description = "A Python package for managing pytest plugins."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -21,21 +21,21 @@ classifiers = [
|
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
dependencies = [
|
|
24
|
-
"build>=1.3.0",
|
|
25
|
-
"colorlog>=6.10.1",
|
|
26
24
|
"custom-python-logger>=4.0.0",
|
|
27
25
|
"pandas>=2.3.3",
|
|
28
|
-
"pathlib>=1.0.1",
|
|
29
|
-
"pre-commit>=4.5.0",
|
|
30
26
|
"pydantic>=2.12.5",
|
|
31
27
|
"pyfiglet>=1.0.4",
|
|
32
28
|
"python-dotenv>=1.2.1",
|
|
33
29
|
"pyyaml>=6.0.3",
|
|
34
30
|
"requests>=2.32.5",
|
|
35
|
-
"setuptools>=80.9.0",
|
|
36
31
|
"tqdm>=4.67.1",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[dependency-groups]
|
|
35
|
+
dev = [
|
|
36
|
+
"build>=1.3.0",
|
|
37
|
+
"pre-commit>=4.5.0",
|
|
37
38
|
"twine>=6.2.0",
|
|
38
|
-
"wheel>=0.45.1",
|
|
39
39
|
]
|
|
40
40
|
|
|
41
41
|
[project.urls]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
from typing import Any
|
|
2
|
-
from pydantic import BaseModel
|
|
1
|
+
from typing import Any
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
from pydantic import BaseModel
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
class BasePydanticModel(BaseModel):
|
|
@@ -10,11 +9,11 @@ class BasePydanticModel(BaseModel):
|
|
|
10
9
|
def __str__(self) -> str:
|
|
11
10
|
return f"{self.__class__.__name__}({self.model_dump()})"
|
|
12
11
|
|
|
13
|
-
def to_dict(self, **kwargs) -> dict[str, Any]:
|
|
12
|
+
def to_dict(self, **kwargs: Any) -> dict[str, Any]:
|
|
14
13
|
"""Wrapper for model_dump."""
|
|
15
14
|
return self.model_dump(**kwargs)
|
|
16
15
|
|
|
17
|
-
def to_json(self, **kwargs) -> str:
|
|
16
|
+
def to_json(self, **kwargs: Any) -> str:
|
|
18
17
|
"""Wrapper for model_dump_json."""
|
|
19
18
|
return self.model_dump_json(**kwargs)
|
|
20
19
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from collections.abc import Callable
|
|
2
3
|
from dataclasses import is_dataclass
|
|
3
4
|
from datetime import date, datetime, time
|
|
4
5
|
from decimal import Decimal
|
|
@@ -15,25 +16,23 @@ from python_base_toolkit.consts.general import LOGGER_NAME
|
|
|
15
16
|
logger = get_logger(LOGGER_NAME)
|
|
16
17
|
|
|
17
18
|
|
|
19
|
+
_TYPE_SERIALIZERS: tuple[tuple[type | tuple[type, ...], Callable[[Any], object]], ...] = (
|
|
20
|
+
(BaseModel, lambda obj: obj.model_dump()),
|
|
21
|
+
(type, lambda obj: obj.__name__),
|
|
22
|
+
(Enum, lambda obj: obj.value),
|
|
23
|
+
((set, tuple), list),
|
|
24
|
+
((datetime, date, time), lambda obj: obj.isoformat()),
|
|
25
|
+
(Decimal, float),
|
|
26
|
+
(Path, str),
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
|
|
18
30
|
def default_serialize(obj: object) -> object:
|
|
19
|
-
if isinstance(obj, BaseModel):
|
|
20
|
-
return obj.model_dump()
|
|
21
|
-
if isinstance(obj, type):
|
|
22
|
-
return obj.__name__
|
|
23
|
-
if is_dataclass(obj) and not isinstance(obj, type):
|
|
31
|
+
if is_dataclass(obj) and not isinstance(obj, type | BaseModel):
|
|
24
32
|
return obj.__dict__
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return list(obj)
|
|
29
|
-
if isinstance(obj, tuple):
|
|
30
|
-
return list(obj)
|
|
31
|
-
if isinstance(obj, datetime | date | time):
|
|
32
|
-
return obj.isoformat()
|
|
33
|
-
if isinstance(obj, Decimal):
|
|
34
|
-
return float(obj)
|
|
35
|
-
if isinstance(obj, Path):
|
|
36
|
-
return str(obj)
|
|
33
|
+
for types, serializer in _TYPE_SERIALIZERS:
|
|
34
|
+
if isinstance(obj, types):
|
|
35
|
+
return serializer(obj)
|
|
37
36
|
if obj is pd.NA:
|
|
38
37
|
return None
|
|
39
38
|
logger.error(f"Object is not serializable: {obj}")
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0/python_base_toolkit.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-base-toolkit
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: A Python package for managing pytest plugins.
|
|
5
5
|
Author: Avi Zaguri
|
|
6
6
|
License: MIT
|
|
@@ -16,21 +16,14 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
16
16
|
Requires-Python: >=3.12
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: build>=1.3.0
|
|
20
|
-
Requires-Dist: colorlog>=6.10.1
|
|
21
19
|
Requires-Dist: custom-python-logger>=4.0.0
|
|
22
20
|
Requires-Dist: pandas>=2.3.3
|
|
23
|
-
Requires-Dist: pathlib>=1.0.1
|
|
24
|
-
Requires-Dist: pre-commit>=4.5.0
|
|
25
21
|
Requires-Dist: pydantic>=2.12.5
|
|
26
22
|
Requires-Dist: pyfiglet>=1.0.4
|
|
27
23
|
Requires-Dist: python-dotenv>=1.2.1
|
|
28
24
|
Requires-Dist: pyyaml>=6.0.3
|
|
29
25
|
Requires-Dist: requests>=2.32.5
|
|
30
|
-
Requires-Dist: setuptools>=80.9.0
|
|
31
26
|
Requires-Dist: tqdm>=4.67.1
|
|
32
|
-
Requires-Dist: twine>=6.2.0
|
|
33
|
-
Requires-Dist: wheel>=0.45.1
|
|
34
27
|
Dynamic: license-file
|
|
35
28
|
|
|
36
29
|

|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/requires.txt
RENAMED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
build>=1.3.0
|
|
2
|
-
colorlog>=6.10.1
|
|
3
1
|
custom-python-logger>=4.0.0
|
|
4
2
|
pandas>=2.3.3
|
|
5
|
-
pathlib>=1.0.1
|
|
6
|
-
pre-commit>=4.5.0
|
|
7
3
|
pydantic>=2.12.5
|
|
8
4
|
pyfiglet>=1.0.4
|
|
9
5
|
python-dotenv>=1.2.1
|
|
10
6
|
pyyaml>=6.0.3
|
|
11
7
|
requests>=2.32.5
|
|
12
|
-
setuptools>=80.9.0
|
|
13
8
|
tqdm>=4.67.1
|
|
14
|
-
twine>=6.2.0
|
|
15
|
-
wheel>=0.45.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/deploy.yml
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/docker.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/ci/task_files/vars.yml
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/__init__.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/consts/general.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/__init__.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/telemetry.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/decorators/timer.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/instances/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/scripts/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/__init__.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/date_time.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/execute.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/file_utils.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/generate_id.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/network.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/path_utils.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/pretty_print.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/pycache.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/random_utils.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/shorten_url.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit/utils/venv_details.py
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{python_base_toolkit-1.1.2 → python_base_toolkit-1.2.0}/python_base_toolkit.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|