Skip to content

Instantly share code, notes, and snippets.

@Sachin-Kottarathodi
Created March 18, 2021 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sachin-Kottarathodi/2a6cccb29b4a9fdc7d58086af07aa6eb to your computer and use it in GitHub Desktop.
Save Sachin-Kottarathodi/2a6cccb29b4a9fdc7d58086af07aa6eb to your computer and use it in GitHub Desktop.
from flask import Flask, request
from fraud_checks import FraudChecks
from setup import Setup
app = Flask(__name__)
@app.route('/', methods=['POST'])
def check_fraud():
try:
response = FraudChecks().check_fraud(request.get_json())
code = 200
except Exception as e:
print("Error occurred ", e)
response = str(e)
code = 500
return response, code
if __name__ == '__main__':
Setup().init()
app.run(port=5000, debug=False, host='0.0.0.0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment