App base
Base class for all apps
flagged: boolname: str | Nonestyle: gws_core.model.typing_style.TypingStyle | Nonetags: TagListConstructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.
listgws_core.core.classes.observer.message_dispatcher.MessageDispatcher | NoneAdd a resource to the AppResource.
Anybool - TrueAdd technical information on the resource. Technical info are useful to set additional information on the resource.
TechnicalInfoYou can redefine this method to define custom logic to check this resource. If there is a problem with the resource, return a string that define the error, otherwise return None This method is called on output resources of a task. If there is an error returned, the task will be set to error and next proceses will not be run. It is also call when uploading a resource (usually for files or folder), if there is an error returned, the resource will not be uploaded
str | NoneClone the resource to create a new instance with a new id. It copies the RFields.
ResourceTypeAnyintDisable the automatic stop of the app when no connections are detected.
Return the access mode of the app, derived from the _requires_authentification flag (True -> AUTHENTICATED, False -> PUBLIC).
AppAccessModeGet the id of the resource model in the database. It is provided by the system for input resources of a task. If the model id is None, it raises an exception.
strGet the technical information of the resource and raise if it does not exist
strTechnicalInfoReturn the custom subdomain of the app, or None if not set.
When set, the app is reachable at a readable, stable host derived from this value instead of the (unstable) resource model id.
str | NoneYou can redefine this method to set a name of the resource. When saving the resource the name will be saved automatically This can be useful to distinguish this resource from another one or to search for the resource
strGet the default style of the resource
TypingStyleGet the main app file name that will be used to run the app. This file must be in the app folder.
strGet the id of the resource model in the database. It is provided by the system for input resources of a task.
str | NoneGet the name of the resource or the default name if the name is None
strGet the parameters that will be passed to the app.
dictReturn the first resource with the given name
strgws_core.resource.resource.Resource | NoneReturn the resource model ids of the sub resources
setReturn the resource models of the sub resources list
list[ResourceModel]Return the sub resources as a list
listReturn the sub resources as a set
setReturn the stop policy of the app.
AppStopPolicyGet the technical information of the resource
strgws_core.resource.technical_info.TechnicalInfo | NoneReturn true if the resource with the given id is in the resource list
strboolAnyintThis can be overwritten to perform custom initialization of the resource. This method is called after the init (constructor) of the resource. The values of RFields are set when this method is called.
Initialize the app instance with the shell proxy. This method is used to create the app instance that will be used to run the app.
ShellProxystrstrAppAccessModeAppInstanceReturn true if the resource list is empty
boolReturn True if the app is executed in a virtual environment.
boolReplace current resources by the resources in the dict
dictResourceOriginScenario | NoneTaskModel | Nonestr | Nonelist[ResourceModel]Set the access mode of the app. By default the app is AUTHENTICATED.
AppAccessModeSet the app config that will be used to generate the app. The AppResource stores the app config typing name to find the app config code. As long as the app config typing name does not change, the app config will be working.
If the app config code is updated, the AppResource will automatically use the updated the app config code.
AppConfigMark this resource as a reference to an existing saved resource.
When set, the system will not create a new resource on save but will reuse the existing one. Use this in a task's run() method before returning an input resource unchanged, or use create_new_resource=False in ResourceSet/ResourceList.add_resource().
Set an optional readable, stable custom subdomain for the app.
When set, the app host uses this value instead of the resource model id, so the URL stays stable across re-publishes. The value is validated as a DNS label and must be unique across all persisted AppResources in the lab.
Passing a falsy value (None or empty string) clears the custom subdomain and restores the default id-based host.
str | NoneSet the code that will be executed in the app environment. This code is executed before the app is loaded and can be used to load environment variables.
BaseEnvShellSet the name of the resource. You can override this method to force a format for the name of the resource.
str | NoneSet a parameter that will be passed to the app into the 'params' variable.
strAnySet the parameters that will be passed to the app into the 'params' variable.
dictBack-compat shim for the boolean flag. Prefer set_access_mode for new code.
boolSet the folder that contains the app code.
This is only recommended if you want to force the version of the app in this Resource and avoid automatic updates. Otherwise use the set_app_config method. The folder is copied and stored as a sub resource of the AppResource. The app need to be re-generated to update the code.
strSet how the app should be stopped when no connections are detected. By default (AUTO), the app is automatically stopped when no connections are detected.
AppStopPolicyCallablebool - FalseReturn the resources as a list
listReturns the name of the class
bool - Falsebool - Falsebool - FalsestrCopy the style of the resource with the possibility to override some properties. Useful when settings the style for a task based on the resource style.
str | Nonegws_core.model.typing_style.TypingIconType | Nonestr | Nonegws_core.model.typing_style.TypingIconColor | NoneTypingStyleReturns the full name of the class
bool - Falsebool - FalsestrstrVersionGet the human name of the object
strGet the short description of the object
strGet the style of the object
TypingStyleGet the typing name of the object Ex: 'RESOURCE.gws_core.Table'
strTypingNameObjGet all the classes that inherit this class
list