Python functions
We have added official support to the Python programming language in various Layrz modules, this expands Layrz's possibilities by allowing programming code to be written within these modules.
Restrictions
To grant the best performance and security, we have added some restrictions to the Python code that can be executed within the Layrz modules. These restrictions are:
- You only can iterate over data or N times using
range
, at maximum of 30 iterations. - You cannot import other modules, or use external libraries.
- You cannot use
eval
,exec
orcompile
functions. - All of the
__builtins__
are disabled.
Available / pre-imported modules
We have added some modules that you can use in your Python code, these modules are:
python
from datetime import datetime, timedelta
import zoneinfo # This module replaces the `pytz` module
import math
import random
import json
import time
import statistics
import itertools
import decimal
import fractions