Referencing code inside BlueCat Gateway - Platform - BlueCat Gateway - 20.3.1

Gateway Administration Guide

prodname
BlueCat Gateway
version_custom
20.3.1

Do not reference any modules, classes, or functions inside the BlueCat Gateway application outside of those defined in the BlueCat Python API documentation. Any other code is internal to BlueCat Gateway and is subject to change and is not guaranteed to behave in the same way or even exist in future versions of BlueCat Gateway. The only exception is the use of app which is the instance of the Flask application as described in this section.

from main_app import app

You can use app to access Flask properties and functions directly. As mentioned above, use @route() decorator rather than app.route(). You can also use app.logger for writing directly to Apache logs, refer to Logging and monitoring for more details.