turbo-lambda 0.7.0__tar.gz → 0.7.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.
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/PKG-INFO +1 -1
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/pyproject.toml +1 -1
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/decorators.py +2 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/log.py +7 -3
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/README.md +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/__init__.py +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/errors.py +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/py.typed +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/schemas.py +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/scripts/__init__.py +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/scripts/update_turbo_lambda_layer.py +0 -0
- {turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/version.py +0 -0
|
@@ -126,6 +126,7 @@ def request_logger_handler[ResponseT](
|
|
|
126
126
|
log_level=logging.DEBUG,
|
|
127
127
|
log_message="request",
|
|
128
128
|
log_exceptions=True,
|
|
129
|
+
excluded_fields=("context",),
|
|
129
130
|
)
|
|
130
131
|
@wraps(func)
|
|
131
132
|
def handler(
|
|
@@ -166,6 +167,7 @@ def gateway_handler[RequestT: pydantic.BaseModel](
|
|
|
166
167
|
log_level=logging.DEBUG,
|
|
167
168
|
log_message="request",
|
|
168
169
|
log_exceptions=True,
|
|
170
|
+
excluded_fields=("context",),
|
|
169
171
|
result_extractor=result_extractor,
|
|
170
172
|
)
|
|
171
173
|
@error_transformer_handler(general_error_to_gateway_response)
|
|
@@ -4,7 +4,9 @@ import datetime
|
|
|
4
4
|
import inspect
|
|
5
5
|
import logging
|
|
6
6
|
import time
|
|
7
|
+
import uuid
|
|
7
8
|
from collections.abc import Callable, Generator, Iterable
|
|
9
|
+
from enum import Enum
|
|
8
10
|
from functools import wraps
|
|
9
11
|
from typing import Any, overload
|
|
10
12
|
|
|
@@ -38,6 +40,8 @@ def _json_custom_default(value: Any) -> Any:
|
|
|
38
40
|
return value.model_dump(mode="json")
|
|
39
41
|
case datetime.datetime() | datetime.date():
|
|
40
42
|
return value.isoformat()
|
|
43
|
+
case uuid.UUID() | Enum():
|
|
44
|
+
return str(value)
|
|
41
45
|
case set():
|
|
42
46
|
return list(value)
|
|
43
47
|
case _:
|
|
@@ -63,7 +67,7 @@ def log_after_call[**P, T](
|
|
|
63
67
|
log_level: int = logging.INFO,
|
|
64
68
|
log_message: str = "call",
|
|
65
69
|
log_exceptions: bool = False,
|
|
66
|
-
excluded_fields: Iterable[str] = ("self",
|
|
70
|
+
excluded_fields: Iterable[str] = ("self",),
|
|
67
71
|
result_extractor: None = None,
|
|
68
72
|
) -> Callable[[Callable[P, T]], Callable[P, T]]: ...
|
|
69
73
|
|
|
@@ -74,7 +78,7 @@ def log_after_call[**P, T](
|
|
|
74
78
|
log_level: int = logging.INFO,
|
|
75
79
|
log_message: str = "call",
|
|
76
80
|
log_exceptions: bool = False,
|
|
77
|
-
excluded_fields: Iterable[str] = ("self",
|
|
81
|
+
excluded_fields: Iterable[str] = ("self",),
|
|
78
82
|
result_extractor: Callable[[T], dict[str, Any]],
|
|
79
83
|
) -> Callable[[Callable[P, T]], Callable[P, T]]: ...
|
|
80
84
|
|
|
@@ -84,7 +88,7 @@ def log_after_call[**P, T]( # noqa: PLR0913
|
|
|
84
88
|
log_level: int = logging.INFO,
|
|
85
89
|
log_message: str = "call",
|
|
86
90
|
log_exceptions: bool = False,
|
|
87
|
-
excluded_fields: Iterable[str] = ("self",
|
|
91
|
+
excluded_fields: Iterable[str] = ("self",),
|
|
88
92
|
result_extractor: Callable[[T], dict[str, Any]] | None = None,
|
|
89
93
|
) -> Callable[P, T] | Callable[[Callable[P, T]], Callable[P, T]]:
|
|
90
94
|
def decorator(func: Callable[P, T]) -> Callable[P, T]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{turbo_lambda-0.7.0 → turbo_lambda-0.7.1}/src/turbo_lambda/scripts/update_turbo_lambda_layer.py
RENAMED
|
File without changes
|
|
File without changes
|