def trigger_event(event=None, **kwargs):
 res = {'result': False, 'message': 'Something went wrong'}
 data = {}
 for value in ('value1', 'value2', 'value3', 'Value1', 'Value2', 'Value3'):
  if (value in kwargs):
   data[value.lower()] = kwargs[value]
 data['occurredat'] = time.strftime('%B %d, %Y %I:%M%p', time.localtime())
 result = _query(event=event, method='POST', data=json.dumps(data))
 if ('status' in result):
  if (result['status'] == 200):
   res['result'] = True
   res['message'] = result['text']
  elif ('error' in result):
   res['message'] = result['error']
 return res

def trigger_event ( event = None , ** kwargs ) : res = { 'result' : False , 'message' : 'Something went wrong' } data = { } for value in ( 'value1' , 'value2' , 'value3' , 'Value1' , 'Value2' , 'Value3' ) : if ( value in kwargs ) : data [ value . lower ( ) ] = kwargs [ value ] data [ 'occurredat' ] = time . strftime ( '%B %d, %Y %I:%M%p' , time . localtime ( ) ) result = _query ( event = event , method = 'POST' , data = json . dumps ( data ) ) if ( 'status' in result ) : if ( result [ 'status' ] == 200 ) : res [ 'result' ] = True res [ 'message' ] = result [ 'text' ] elif ( 'error' in result ) : res [ 'message' ] = result [ 'error' ] return res
trigger a configured event in ifttt .