Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# 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.

To expose the agent API over Python binding use the following in your agent code:

`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.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.