Exposing the Agent API to Python Scripts
TIBCO Enterprise Administrator includes a Python module that has the ability to 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.
To expose the agent API over Python binding use the following in your agent code:
TeaAgentServer.setExposePythonAPI(true) - in server mode agent. The product will be accessible from EnterpriseAdministrator.products dictionary
or
TeaAgentServlet.setExposePythonAPI(true) - in servlet mode agent. The product will be accessible from EnterpriseAdministrator.products dictionary
The default value for setExposePythonAPI() is false in which case you will not need to call the method at all. When set to false, the product will be accessible from EnterpriseAdministrator._unsupported_products dictionary. TIBCO Enterprise Administrator will still provide access to the "unsupported" APIs, but you will see a message saying that the API is unsupported when you try to access it using EnterpriseAdministrator.unsupported_product function.
For more details, refer to the TIBCO Enterprise Administrator User's Guide.
If TEA 2.0.0 Python Binding is used with a TIBCO Enterprise Administrator server from a previous TIBCO Enterprise Administrator release, the product will be considered as "unsupported product" and will be accessible from EnterpriseAdministrator._unsupported_products dictionary. This is because the setExposePythonAPI is not available in the pre-2.0.0 agents library.