def dict_to_ddb ( item ) : # type: (Dict[str, Any]) -> Dict[str, Any] # TODO: narrow these types down serializer = TypeSerializer ( ) return { key : serializer . serialize ( value ) for key , value in item . items ( ) }
python dict to sqlalchemy item
Converts a native Python dictionary to a raw DynamoDB item .
def dict_to_ddb(item):
    # type: (Dict[str, Any]) -> Dict[str, Any]
    # TODO: narrow these types down
    """Converts a native Python dictionary to a raw DynamoDB item.

    :param dict item: Native item
    :returns: DynamoDB item
    :rtype: dict
    """
    serializer = TypeSerializer()
    return {key: serializer.serialize(value) for key, value in item.items()}