def format_event(event):
 to_delete = ('id', 'created_at', 'updated_at', 'deleted_at', 'deleted', 'action_id')
 for key in to_delete:
  if (key in event):
   del event[key]
 if ('start_time' in event):
  event['start_time'] = str(event['start_time'].replace(tzinfo=None))
 if ('finish_time' in event):
  event['finish_time'] = str(event['finish_time'].replace(tzinfo=None))
 return event

def format_event ( event ) : to_delete = ( 'id' , 'created_at' , 'updated_at' , 'deleted_at' , 'deleted' , 'action_id' ) for key in to_delete : if ( key in event ) : del event [ key ] if ( 'start_time' in event ) : event [ 'start_time' ] = str ( event [ 'start_time' ] . replace ( tzinfo = None ) ) if ( 'finish_time' in event ) : event [ 'finish_time' ] = str ( event [ 'finish_time' ] . replace ( tzinfo = None ) ) return event
remove keys that arent serialized .