jinja2.sandbox.SandboxedEnvironment.is_safe_attribute

SandboxedEnvironment.is_safe_attribute(obj, attr, value)[source]

The sandboxed environment will call this method to check if the attribute of an object is safe to access. Per default all attributes starting with an underscore are considered private as well as the special attributes of internal python objects as returned by the is_internal_attribute() function.