hexkit 7.2.0__tar.gz → 7.2.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.
- {hexkit-7.2.0/src/hexkit.egg-info → hexkit-7.2.1}/PKG-INFO +1 -1
- {hexkit-7.2.0 → hexkit-7.2.1}/pyproject.toml +1 -1
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/correlation.py +10 -5
- {hexkit-7.2.0 → hexkit-7.2.1/src/hexkit.egg-info}/PKG-INFO +1 -1
- {hexkit-7.2.0 → hexkit-7.2.1}/LICENSE +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/MANIFEST.in +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/README.md +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/setup.cfg +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/__main__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/base.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/config.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/custom_types.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/log.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/opentelemetry.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/dao.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/daopub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/daosub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/eventpub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/eventsub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/protocols/objstorage.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/config.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/provider/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/provider/daosub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/provider/eventpub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/provider/eventsub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/provider/utils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/testcontainer.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/akafka/testutils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/migrations/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/migrations/_manager.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/migrations/_utils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/migrations/helpers.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/provider.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongodb/testutils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/provider/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/provider/config.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/provider/daopub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/provider/persistent_pub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/mongokafka/testutils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/provider.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/test_files/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/testutils/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/testutils/_fixtures.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/testutils/_typical_workflow.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/s3/testutils/_utils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/testing/__init__.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/testing/dao.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/testing/eventpub.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/providers/testing/s3.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/py.typed +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit/utils.py +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit.egg-info/SOURCES.txt +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit.egg-info/dependency_links.txt +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit.egg-info/requires.txt +0 -0
- {hexkit-7.2.0 → hexkit-7.2.1}/src/hexkit.egg-info/top_level.txt +0 -0
|
@@ -23,7 +23,7 @@ classifiers = [
|
|
|
23
23
|
"Intended Audience :: Developers",
|
|
24
24
|
]
|
|
25
25
|
name = "hexkit"
|
|
26
|
-
version = "7.2.
|
|
26
|
+
version = "7.2.1"
|
|
27
27
|
description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
|
|
28
28
|
dependencies = [
|
|
29
29
|
"opentelemetry-api >=1.37, <2",
|
|
@@ -63,13 +63,13 @@ def new_correlation_id() -> UUID4:
|
|
|
63
63
|
return uuid4()
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
def validate_correlation_id(correlation_id: Any):
|
|
66
|
+
def validate_correlation_id(correlation_id: Any) -> None:
|
|
67
67
|
"""Validate the correlation ID.
|
|
68
68
|
|
|
69
69
|
Raises:
|
|
70
|
-
InvalidCorrelationIdError: If the correlation ID is not a
|
|
70
|
+
InvalidCorrelationIdError: If the correlation ID is not a UUID4.
|
|
71
71
|
"""
|
|
72
|
-
if not isinstance(correlation_id, UUID):
|
|
72
|
+
if not isinstance(correlation_id, UUID) or correlation_id.version != 4:
|
|
73
73
|
raise InvalidCorrelationIdError(correlation_id=correlation_id)
|
|
74
74
|
|
|
75
75
|
|
|
@@ -77,13 +77,18 @@ def correlation_id_from_str(correlation_id: str) -> UUID4:
|
|
|
77
77
|
"""Convert a string to a UUID4.
|
|
78
78
|
|
|
79
79
|
Raises:
|
|
80
|
-
InvalidCorrelationIdError: If the string is not a valid
|
|
80
|
+
InvalidCorrelationIdError: If the string is not a valid UUID4.
|
|
81
81
|
"""
|
|
82
82
|
try:
|
|
83
|
-
|
|
83
|
+
converted_id = UUID(correlation_id)
|
|
84
84
|
except ValueError as err:
|
|
85
85
|
raise InvalidCorrelationIdError(correlation_id=correlation_id) from err
|
|
86
86
|
|
|
87
|
+
if converted_id.version != 4:
|
|
88
|
+
raise InvalidCorrelationIdError(correlation_id=correlation_id)
|
|
89
|
+
|
|
90
|
+
return converted_id
|
|
91
|
+
|
|
87
92
|
|
|
88
93
|
@asynccontextmanager
|
|
89
94
|
async def set_correlation_id(correlation_id: UUID4):
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|