Exposing the Agent API to Python Scripts
TIBCO Enterprise Administrator includes a Python module that can expose any agent as a collection of objects in Python, by generating Python classes that mimic the object types defined by your agent, and constructing Python objects as necessary to reflect your agent's object instances. This exposure to Python is not automatic. Your agent must specifically request the exposure.
TeaAgentServer.setExposePythonAPI(true) - in server mode agent. The product is accessible from
EnterpriseAdministrator.products dictionary
or
TeaAgentServlet.setExposePythonAPI(true) - in servlet mode agent. The product is accessible from
EnterpriseAdministrator.products dictionary.
The default value for
setExposePythonAPI() is
false in which case you don't have to call the method at all. When set to false, the product is accessible from
EnterpriseAdministrator.products_with_provisional_apis dictionary. TIBCO Enterprise Administrator will still provide access to the "provisional" APIs, but you will see a message saying that the API is provisional when you try to access it using
EnterpriseAdministrator.products_with_provisional_apis function.
For more details, refer to the TIBCO Enterprise Administrator User Guide.
If agents developed with TEA Agent Library version prior to 2.0.0 are registered with TIBCO Enterprise Administrator server having version above or equal to 2.0.0, the product is considered as "provisional product" and is accessible from
EnterpriseAdministrator.products_with_provisional_apis dictionary. This is because the
setExposePythonAPI is not available in the pre-2.0.0 agents library.