Below is the piece of code that i have for my api and i have a class auths which has method createuser returning simple int value as of now but when i hit with restapi is gives error. Any idea ?
api.py
from auths import auths
from flask import Flask, url_for
app = Flask(__name__)
@app.route('/')
def api_root():
#m = auths.createuser()
return "m"
if __name__ == '__main__':
app.run()
auths/auths.py
#!/usr/bin/python
class auths:
def createuser():
return 1
Error:-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>