modmex-lambda 0.5.1__tar.gz → 0.5.2__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.
Files changed (228) hide show
  1. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/PKG-INFO +5 -3
  2. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/README.md +4 -2
  3. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/logging.py +35 -0
  4. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/pyproject.toml +1 -1
  5. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_logging.py +44 -0
  6. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/.github/workflows/ci.yml +0 -0
  7. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/.github/workflows/release.yml +0 -0
  8. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/.gitignore +0 -0
  9. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/LICENSE +0 -0
  10. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/__init__.py +0 -0
  11. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/__init__.py +0 -0
  12. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/cloudwatch.py +0 -0
  13. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/dynamodb.py +0 -0
  14. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/eventbridge.py +0 -0
  15. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/icloudwatch.py +0 -0
  16. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/idynamodb.py +0 -0
  17. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/ieventbridge.py +0 -0
  18. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/ilambda.py +0 -0
  19. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/is3.py +0 -0
  20. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/isns.py +0 -0
  21. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/isqs.py +0 -0
  22. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/lambda_.py +0 -0
  23. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/module.py +0 -0
  24. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/s3.py +0 -0
  25. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/sns.py +0 -0
  26. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/connectors/sqs.py +0 -0
  27. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/__init__.py +0 -0
  28. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/api_gateway_authorizer_event.py +0 -0
  29. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/api_gateway_proxy_event.py +0 -0
  30. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/api_gateway_websocket_event.py +0 -0
  31. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/cognito_user_pool_event.py +0 -0
  32. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/data_classes/common.py +0 -0
  33. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/dependencies.py +0 -0
  34. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/__init__.py +0 -0
  35. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/api_gateway.py +0 -0
  36. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/constants.py +0 -0
  37. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/content_types.py +0 -0
  38. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/cors.py +0 -0
  39. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/__init__.py +0 -0
  40. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/compat.py +0 -0
  41. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/dependant.py +0 -0
  42. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/dependency_middleware.py +0 -0
  43. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/depends.py +0 -0
  44. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/params.py +0 -0
  45. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/dependencies/types.py +0 -0
  46. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/exception_handler.py +0 -0
  47. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/exceptions.py +0 -0
  48. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/gateway_response.py +0 -0
  49. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/middlewares.py +0 -0
  50. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/params.py +0 -0
  51. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/request.py +0 -0
  52. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/response.py +0 -0
  53. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/routing.py +0 -0
  54. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/routing_fallbacks.py +0 -0
  55. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_handler/types.py +0 -0
  56. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/event_sources.py +0 -0
  57. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/exceptions.py +0 -0
  58. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/params.py +0 -0
  59. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/parser.py +0 -0
  60. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/request.py +0 -0
  61. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/resolver.py +0 -0
  62. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/response.py +0 -0
  63. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/routing.py +0 -0
  64. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/shared/__init__.py +0 -0
  65. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/shared/cookies.py +0 -0
  66. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/shared/headers_serializer.py +0 -0
  67. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/shared/json_encoder.py +0 -0
  68. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/shared/types.py +0 -0
  69. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/__init__.py +0 -0
  70. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/__init__.py +0 -0
  71. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/dynamodb.py +0 -0
  72. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/kinesis.py +0 -0
  73. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/s3.py +0 -0
  74. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/sns.py +0 -0
  75. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/events/sqs.py +0 -0
  76. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/filters/__init__.py +0 -0
  77. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/filters/content.py +0 -0
  78. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/filters/event_type.py +0 -0
  79. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/filters/latch.py +0 -0
  80. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/filters/skip.py +0 -0
  81. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/__init__.py +0 -0
  82. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/base_flavor.py +0 -0
  83. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/cdc.py +0 -0
  84. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/collect.py +0 -0
  85. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/correlate.py +0 -0
  86. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/evaluate.py +0 -0
  87. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/expired.py +0 -0
  88. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/iflavor.py +0 -0
  89. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/job.py +0 -0
  90. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/materialize.py +0 -0
  91. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/s3.py +0 -0
  92. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/sns.py +0 -0
  93. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/task.py +0 -0
  94. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/flavors/update.py +0 -0
  95. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/irules_registry.py +0 -0
  96. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/__init__.py +0 -0
  97. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/cloudwatch.py +0 -0
  98. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/dynamodb.py +0 -0
  99. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/ioperator.py +0 -0
  100. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/lambda_.py +0 -0
  101. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/publisher.py +0 -0
  102. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/s3.py +0 -0
  103. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/sns.py +0 -0
  104. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/operators/sqs.py +0 -0
  105. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/rules_registry.py +0 -0
  106. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/runner.py +0 -0
  107. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/__init__.py +0 -0
  108. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/base.py +0 -0
  109. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/dynamodb.py +0 -0
  110. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/kinesis.py +0 -0
  111. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/s3.py +0 -0
  112. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/sns.py +0 -0
  113. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/sources/sqs.py +0 -0
  114. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/__init__.py +0 -0
  115. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/apigateway.py +0 -0
  116. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/aws.py +0 -0
  117. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/batch.py +0 -0
  118. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/cloudwatch.py +0 -0
  119. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/concurrency.py +0 -0
  120. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/contracts.py +0 -0
  121. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/data_classes/__init__.py +0 -0
  122. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/data_classes/dynamodb.py +0 -0
  123. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/decorators.py +0 -0
  124. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/dynamodb.py +0 -0
  125. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/eventbridge.py +0 -0
  126. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/faults.py +0 -0
  127. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/filters.py +0 -0
  128. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/json_encoder.py +0 -0
  129. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/lambda_.py +0 -0
  130. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/operators.py +0 -0
  131. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/pluralize.py +0 -0
  132. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/print.py +0 -0
  133. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/retry.py +0 -0
  134. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/s3.py +0 -0
  135. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/sns.py +0 -0
  136. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/split.py +0 -0
  137. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/sqs.py +0 -0
  138. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/tags.py +0 -0
  139. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/time.py +0 -0
  140. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/stream/utils/uow.py +0 -0
  141. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/tracing.py +0 -0
  142. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/modmex_lambda/validation.py +0 -0
  143. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/poetry.lock +0 -0
  144. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/__init__.py +0 -0
  145. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/conftest.py +0 -0
  146. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/__init__.py +0 -0
  147. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/conftest.py +0 -0
  148. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_cloudwatch.py +0 -0
  149. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_dynamodb.py +0 -0
  150. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_lazy_clients.py +0 -0
  151. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_s3.py +0 -0
  152. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_simple_connectors.py +0 -0
  153. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_sns.py +0 -0
  154. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/connectors/test_sqs.py +0 -0
  155. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/data_classes/test_api_gateway_proxy_event.py +0 -0
  156. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/data_classes/test_cognito_user_pool_event.py +0 -0
  157. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/data_classes/test_common.py +0 -0
  158. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/__init__.py +0 -0
  159. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_api_gateway.py +0 -0
  160. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_cors.py +0 -0
  161. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_dependencies.py +0 -0
  162. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_exception_handler.py +0 -0
  163. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_gateway_response.py +0 -0
  164. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_request.py +0 -0
  165. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_response.py +0 -0
  166. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/event_handler/test_routing.py +0 -0
  167. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/shared/test_cookies_headers.py +0 -0
  168. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/shared/test_json_encoder.py +0 -0
  169. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/__init__.py +0 -0
  170. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/conftest.py +0 -0
  171. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/events/test_dynamodb.py +0 -0
  172. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/events/test_kinesis.py +0 -0
  173. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/events/test_s3.py +0 -0
  174. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/events/test_sns.py +0 -0
  175. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/events/test_sqs.py +0 -0
  176. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/filters/__init__.py +0 -0
  177. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/filters/test_content.py +0 -0
  178. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/filters/test_event_type.py +0 -0
  179. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/filters/test_latch.py +0 -0
  180. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/filters/test_skip.py +0 -0
  181. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/__init__.py +0 -0
  182. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/source_events.py +0 -0
  183. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_base_flavor.py +0 -0
  184. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_cdc.py +0 -0
  185. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_collect.py +0 -0
  186. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_correlate.py +0 -0
  187. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_evaluate.py +0 -0
  188. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_expired.py +0 -0
  189. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_job.py +0 -0
  190. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_materialize.py +0 -0
  191. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_s3.py +0 -0
  192. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_sns.py +0 -0
  193. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_task.py +0 -0
  194. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/flavors/test_update.py +0 -0
  195. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/test_dependency_resolver.py +0 -0
  196. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/test_rules_registry.py +0 -0
  197. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/test_runner.py +0 -0
  198. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/test_runner_pipeline.py +0 -0
  199. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/test_sources.py +0 -0
  200. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/__init__.py +0 -0
  201. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/faults.py +0 -0
  202. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_apigateway.py +0 -0
  203. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_aws.py +0 -0
  204. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_batch.py +0 -0
  205. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_cloudwatch.py +0 -0
  206. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_concurrency.py +0 -0
  207. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_decorators.py +0 -0
  208. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_dynamodb.py +0 -0
  209. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_eventbridge.py +0 -0
  210. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_filters.py +0 -0
  211. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_json_encoder.py +0 -0
  212. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_lambda.py +0 -0
  213. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_operators.py +0 -0
  214. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_pluralize.py +0 -0
  215. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_print.py +0 -0
  216. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_retry.py +0 -0
  217. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_s3.py +0 -0
  218. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_sns.py +0 -0
  219. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_split.py +0 -0
  220. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_sqs.py +0 -0
  221. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_tags.py +0 -0
  222. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_time.py +0 -0
  223. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/stream/utils/test_uow.py +0 -0
  224. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_lazy_imports.py +0 -0
  225. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_parser_event_sources.py +0 -0
  226. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_reexports.py +0 -0
  227. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_tracing.py +0 -0
  228. {modmex_lambda-0.5.1 → modmex_lambda-0.5.2}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modmex-lambda
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Ultra-lightweight AWS Lambda utilities for API Gateway routing and event handling.
5
5
  Author: Modmex
6
6
  License: MIT
@@ -597,15 +597,17 @@ from modmex_lambda import Logger
597
597
  logger = Logger()
598
598
 
599
599
 
600
+ @logger.inject_lambda_context(log_event=True)
600
601
  def lambda_handler(event, context):
601
- logger.set_context(context=context, event=event)
602
602
  logger.append_keys(tenant_id="mx")
603
603
  logger.info("request received")
604
604
  ```
605
605
 
606
606
  The logger emits structured JSON, reads `LOG_LEVEL`, uses `SERVICE_NAME` or
607
607
  `AWS_LAMBDA_FUNCTION_NAME` when no service is passed, and can extract Lambda
608
- request IDs and API Gateway correlation IDs.
608
+ request IDs and API Gateway correlation IDs. The `inject_lambda_context`
609
+ decorator resets logger state by default for warm Lambda invocations, injects
610
+ Lambda metadata, and can optionally log the incoming event.
609
611
 
610
612
  ## Tracing
611
613
 
@@ -574,15 +574,17 @@ from modmex_lambda import Logger
574
574
  logger = Logger()
575
575
 
576
576
 
577
+ @logger.inject_lambda_context(log_event=True)
577
578
  def lambda_handler(event, context):
578
- logger.set_context(context=context, event=event)
579
579
  logger.append_keys(tenant_id="mx")
580
580
  logger.info("request received")
581
581
  ```
582
582
 
583
583
  The logger emits structured JSON, reads `LOG_LEVEL`, uses `SERVICE_NAME` or
584
584
  `AWS_LAMBDA_FUNCTION_NAME` when no service is passed, and can extract Lambda
585
- request IDs and API Gateway correlation IDs.
585
+ request IDs and API Gateway correlation IDs. The `inject_lambda_context`
586
+ decorator resets logger state by default for warm Lambda invocations, injects
587
+ Lambda metadata, and can optionally log the incoming event.
586
588
 
587
589
  ## Tracing
588
590
 
@@ -7,6 +7,7 @@ import os
7
7
  import sys
8
8
  import traceback
9
9
  from datetime import datetime, timezone
10
+ from functools import wraps
10
11
  from threading import RLock
11
12
  from typing import Any, Callable, TextIO
12
13
 
@@ -58,6 +59,28 @@ class Logger:
58
59
  self._context = context
59
60
  self._event = event
60
61
 
62
+ def inject_lambda_context(
63
+ self,
64
+ func: Callable[..., Any] | None = None,
65
+ *,
66
+ log_event: bool = False,
67
+ ) -> Callable[..., Any]:
68
+ def decorator(handler: Callable[..., Any]) -> Callable[..., Any]:
69
+ @wraps(handler)
70
+ def wrapper(event: dict[str, Any], context: object, *args: Any, **kwargs: Any) -> Any:
71
+ self.clear_state()
72
+ self.set_context(context=context, event=event)
73
+ self._append_lambda_context_keys(context)
74
+ if log_event:
75
+ self.info("lambda event", event=event)
76
+ return handler(event, context, *args, **kwargs)
77
+
78
+ return wrapper
79
+
80
+ if func is None:
81
+ return decorator
82
+ return decorator(func)
83
+
61
84
  def append_keys(self, **kwargs: Any) -> None:
62
85
  with self._lock:
63
86
  self._persistent_keys.update(kwargs)
@@ -138,6 +161,18 @@ class Logger:
138
161
  return message % args
139
162
  return message
140
163
 
164
+ def _append_lambda_context_keys(self, context: object | None) -> None:
165
+ if context is None:
166
+ return
167
+
168
+ keys = {
169
+ "function_name": getattr(context, "function_name", None),
170
+ "function_memory_size": getattr(context, "memory_limit_in_mb", None),
171
+ "function_arn": getattr(context, "invoked_function_arn", None),
172
+ "function_request_id": getattr(context, "aws_request_id", None),
173
+ }
174
+ self.append_keys(**{key: value for key, value in keys.items() if value is not None})
175
+
141
176
  def _extract_request_id(self) -> str | None:
142
177
  if self._context is None:
143
178
  return None
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "modmex-lambda"
7
- version = "0.5.1"
7
+ version = "0.5.2"
8
8
  description = "Ultra-lightweight AWS Lambda utilities for API Gateway routing and event handling."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10,<4.0"
@@ -11,6 +11,9 @@ from modmex_lambda.logging import Logger
11
11
 
12
12
  class Context:
13
13
  aws_request_id = "req-123"
14
+ function_name = "orders-handler"
15
+ memory_limit_in_mb = "256"
16
+ invoked_function_arn = "arn:aws:lambda:us-east-1:123456789012:function:orders-handler"
14
17
 
15
18
 
16
19
  class Status(Enum):
@@ -59,6 +62,47 @@ def test_logger_includes_request_id_and_correlation_id_from_context_and_event()
59
62
  assert payload["correlation_id"] == "corr-1"
60
63
 
61
64
 
65
+ def test_logger_inject_lambda_context_sets_context_and_logs_event() -> None:
66
+ stream = io.StringIO()
67
+ logger = Logger(service="orders", stream=stream)
68
+
69
+ @logger.inject_lambda_context(log_event=True)
70
+ def handler(event, context):
71
+ logger.info("handled")
72
+ return {"ok": True}
73
+
74
+ result = handler({"headers": {"X-Correlation-Id": "corr-1"}, "order_id": "o-1"}, Context())
75
+
76
+ lines = [json.loads(line) for line in stream.getvalue().splitlines() if line.strip()]
77
+ assert result == {"ok": True}
78
+ assert lines[0]["message"] == "lambda event"
79
+ assert lines[0]["event"]["order_id"] == "o-1"
80
+ assert lines[0]["request_id"] == "req-123"
81
+ assert lines[0]["correlation_id"] == "corr-1"
82
+ assert lines[0]["function_name"] == "orders-handler"
83
+ assert lines[0]["function_memory_size"] == "256"
84
+ assert lines[0]["function_arn"] == "arn:aws:lambda:us-east-1:123456789012:function:orders-handler"
85
+ assert lines[0]["function_request_id"] == "req-123"
86
+ assert lines[1]["message"] == "handled"
87
+ assert lines[1]["request_id"] == "req-123"
88
+
89
+
90
+ def test_logger_inject_lambda_context_clears_state_for_warm_starts() -> None:
91
+ stream = io.StringIO()
92
+ logger = Logger(service="orders", stream=stream)
93
+ logger.append_keys(tenant="stale")
94
+
95
+ @logger.inject_lambda_context
96
+ def handler(event, context):
97
+ logger.info("handled")
98
+
99
+ handler({"headers": {}}, Context())
100
+
101
+ payload = json.loads(stream.getvalue().strip())
102
+ assert "tenant" not in payload
103
+ assert payload["function_name"] == "orders-handler"
104
+
105
+
62
106
  def test_logger_append_keys_and_clear_state() -> None:
63
107
  stream = io.StringIO()
64
108
  logger = Logger(service="orders", stream=stream)
File without changes
File without changes
File without changes