Module aws_lambda_powertools.utilities.idempotency.serialization.no_op

Expand source code
from typing import Dict

from aws_lambda_powertools.utilities.idempotency.serialization.base import BaseIdempotencySerializer


class NoOpSerializer(BaseIdempotencySerializer):
    def __init__(self):
        """
        Parameters
        ----------
        Default serializer, does not transform data
        """

    def to_dict(self, data: Dict) -> Dict:
        return data

    def from_dict(self, data: Dict) -> Dict:
        return data

Classes

class NoOpSerializer

Abstract Base Class for Idempotency serialization layer, supporting dict operations.

Parameters

Default serializer, does not transform data

Expand source code
class NoOpSerializer(BaseIdempotencySerializer):
    def __init__(self):
        """
        Parameters
        ----------
        Default serializer, does not transform data
        """

    def to_dict(self, data: Dict) -> Dict:
        return data

    def from_dict(self, data: Dict) -> Dict:
        return data

Ancestors

Methods

def from_dict(self, data: Dict) ‑> Dict
Expand source code
def from_dict(self, data: Dict) -> Dict:
    return data
def to_dict(self, data: Dict) ‑> Dict
Expand source code
def to_dict(self, data: Dict) -> Dict:
    return data