on-internet
← Community

How to return a response in callback function with flask

Stack Overflow ·

here is a dll, that can compare face distance, and the compareFace.dll, I need use callback to receive it's value now, I want use flask to wrapper it, then can visit by http and json lib= c.CDLL('comparedFace.dll') CALLBACKFUNC = c.CFUNCTYPE(None, c.c_int, c.c_char_p) lib.startComparedFace.restype = c.c_int lib.startComparedFace.argtypes = (c.c_char_p, c.c_char_p, CALLBACKFUNC) @app.route('/compare', methods=['GET', 'POST']) def test(): if request.method == 'POST': request_json = request.get_json() print(request_json) number = request_json.get('number') image01 = request_json.get('image01') im

Comments

Sign in or sign up to comment and upvote.

No comments yet.