v1.17.0 #468
Closed
heitorlessa
started this conversation in
Show and tell
v1.17.0
#468
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
This release brings a 1/ new handy decorator
event_source
for data classes, 2/ API Gateway HTTP API support for Parser, 3/ a new parameter to reset logging state upon every Lambda invocation in Logger, and 4/ high level methods to fetch attribute values and their types when usingDynamoDBStreamEvent
data class.Event source decorator
Similarly to Parser's
parse
decorator, you can now useevent_source
decorator to instantiate a data class as part of the invocation more easily.This also gives you the ability to combine other utilities like Idempotency which expects a dictionary to serialize/deserialize without losing the benefits of self-documented schema and high level data methods.
API Gateway HTTP API Parser support
Parser now supports API Gateway HTTP API as a native model in addition to REST API.
Like REST API, Parser also supports an envelope for HTTP API to help you extract your model from the payload, providing deep data validation, type enforcement at runtime, and more.
Resetting Logger state on every invocation
As Logger is initialized in the global scope, logging state can persist across invocations. It is a good practice to always append new keys and use default values (
None
if unavailable), so Logger can update and remove keys on a per invocation basis.However, there are times where you might add keys conditionally depending on the incoming event. For these type of use cases, you can now use
clear_state
parameter when usinginject_lambda_context
decorator.DynamoDB Stream Event AttributeValueType and AttributeValue
You can now introspect what DynamoDB Record type and value is more easily with
AttributeValueType
andAttributeValue
. This is useful when you might want to deserialize or deal with certain records and their attributes differently based on their type, e.g. a map vs string.Each DynamoDB key available in the stream record now has high level methods such as
get_value
andget_type
.You can find their respective implementations and all contributors below.
Changes
🌟New features and non-breaking changes
📜 Documentation updates
🔧 Maintenance
This release was made possible by the following contributors:
@dependabot, @dependabot[bot], @heitorlessa, @michaelbrewer and @risenberg-cyberark
This discussion was created from the release v1.17.0.
Beta Was this translation helpful? Give feedback.
All reactions