Referencing code inside BlueCat Gateway - Platform - BlueCat Gateway - 21.11.2

Gateway Administration Guide

Product name
BlueCat Gateway

Do not reference any modules, classes, or functions inside the BlueCat Gateway application outside of those defined in the BlueCat Address Manager Python API. 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.