def serialize_me ( self , account , bucket_details ) : return self . dumps ( { "account" : account , "detail" : { "request_parameters" : { "bucket_name" : bucket_details [ "Name" ] , "creation_date" : bucket_details [ "CreationDate" ] . replace ( tzinfo = None , microsecond = 0 ) . isoformat ( ) + "Z" } } } ) . data
python serialize aws event data
Serializes the JSON for the Polling Event Model .
def serialize_me(self, account, bucket_details):
        """Serializes the JSON for the Polling Event Model.

        :param account:
        :param bucket_details:
        :return:
        """
        return self.dumps({
            "account": account,
            "detail": {
                "request_parameters": {
                    "bucket_name": bucket_details["Name"],
                    "creation_date": bucket_details["CreationDate"].replace(
                        tzinfo=None, microsecond=0).isoformat() + "Z"
                }
            }
        }).data