smif.http_api.app module

Provide APP constant for the purposes of manually running the flask app

For example, build the front end::
cd smif/app/ npm run build
Or to rebuild js/css on change:
npm run watch
Then run the server app in debug mode with environment variables
FLASK_APP=smif.http_api.app FLASK_DEBUG=1 flask run

On Windows under some Flask versions, use this workaround for ‘SyntaxError: Non-UTF-8 code starting with ‘’ in file flask.exe’ (see https://github.com/pallets/flask/issues/2543):

FLASK_APP=smif.http_api.app FLASK_DEBUG=1 python -m flask run
Or if backend debug mode is not needed, just use the smif CLI:
smif app -d ../sample_project

Summary

Functions:

get_data_interface Return a data_layer.

Reference

smif.http_api.app.get_data_interface()[source]

Return a data_layer.DataInterface