First commit of api.py, app.py and test_app.py