In general, do not reference modules, classes, or functions inside the BlueCat Gateway application outside of those defined in Gateway API client references. All other code is considered internal to BlueCat Gateway and may change or not behave in the same way (or even exist) in future versions of Gateway.
Exceptions:
One exception is when you access Gateway through Gateway's Flask application instance while using the Address Manager REST v1 API, as follows: :
from main_app import appFor more details on the Address Manager REST v1 API Client, see Address Manager REST v1 API reference.
Flask is a lightweight Python web framework for web applications. Gateway incorporates Flask to make it easier for workflow developers to build Gateway workflows in Python. You can use Gateway to access Flask properties and functions directly. To do so, use the @route() decorator instead of app.route(). For more details, see Editing a workflow script.
You can also use
app.loggerfor writing directly to Apache logs. For more details, see Logging events and monitoring BlueCat Gateway status.