Skip to main content

Element

The Element object is an element object that developers can obtain through app.getElement(fullName).

Properties

NameTypeDescription
envIdstrEnvironment ID, e.g.: JRE_MWcVmUZjEq
appIdstrApplication ID, e.g.: wanyun.MyApp
versionstrApplication version, e.g.: 1.0.0
defineDict[str, Any]Element definition dictionary
fullNamestrElement full name, e.g.: models.UserModel
namestrElement name (without namespace), e.g.: UserModel
elementTypestrElement type, e.g.: models.NormalType
buildTimeintElement build timestamp
debugboolWhether in debug mode state
moduleModulePython module object corresponding to the element
appAppApplication object that the element belongs to
Danger

Developers can read the above properties, but should not forcibly modify these property values, as it may cause unpredictable errors.

Methods

getFile

Get the file content within the element.

Parameters:

  • filename (str): Filename
  • isBinary (bool, optional): Whether it's a binary file, defaults to False

Return Value:

File content.

Return Type:

str or bytes

Proxy Pattern

Element implements transparent proxy for execution objects, allowing developers to directly call methods and properties of execution objects through the Element object.

JitAI AssistantBeta
Powered by JitAI