astutus.web package

Submodules

astutus.web.flask_app module

This module implements the Flask web application for the package.

The web application provides:

  • A server for the Sphinx generated documentation.

  • An HTML interface for interacting with the system.

  • A REST API for interacting with the system remotely

  • or locally for automation.

The handle routines are all Flask endpoints.

Maintainence note:

Include the app.route decorator in the docstrings for the handle routines.

astutus.web.flask_app.create_app_and_db()
astutus.web.flask_app.handle_astutus()

app.route(‘/astutus’)

astutus.web.flask_app.handle_doc()

@app.route(‘/astutus/doc’)

astutus.web.flask_app.handle_doc_path(path)

app.route(‘/astutus/doc/<path:path>’)

astutus.web.flask_app.handle_doc_top()

app.route(‘/astutus/doc/index.html’)

astutus.web.flask_app.handle_raspi()

app.route(‘/astutus/raspi’, methods=[‘POST’, ‘GET’])

astutus.web.flask_app.handle_raspi_item(id)

app.route(‘/astutus/raspi/<int:id>’, methods=[‘POST’, ‘GET’, ‘DELETE’])

astutus.web.flask_app.handle_raspi_item_ifconfig(id)

” app.route(‘/astutus/raspi/<int:id>/ifconfig’, methods=[‘GET’])

astutus.web.flask_app.handle_top()

app.route(‘/’)

astutus.web.flask_app.process_raspi_find_form(form)
astutus.web.flask_app.run_with_standard_options()
astutus.web.flask_app.tojson_pretty_jinja2_template_file(json_text)

Module contents