gws.plugin.model_value.expression
¶
Expression value.
This value is computed by evaluating a python expression.
The following variables are provided to the expression:
app
- the Application objectuser
- current userproject
- current projectfeature
- feature this value is evaluated formc
-ModelContext
object
The following modules are available:
date
-gws.lib.datetimex
module
Additional modules can be imported by specifying them in the
imports
configuration option. This should be a list of module names
to import, e.g. ["math", "os"]
.
Source code: gws.plugin.model_value.expression
Package Contents¶
- class gws.plugin.model_value.expression.Config¶
Bases:
gws.base.model.value.Config
Expression-based value. (added in 8.1)
- expression: str¶
Python expression to evaluate.
- imports: list[str] | None¶
List of additional modules to import. (added in 8.2)