jinja2.sandbox.Environment.sandboxed

Environment.sandboxed = False

if this environment is sandboxed. Modifying this variable won’t make the environment sandboxed though. For a real sandboxed environment have a look at jinja2.sandbox. This flag alone controls the code generation by the compiler.