jinja2.sandbox.ImmutableSandboxedEnvironment.getattr

ImmutableSandboxedEnvironment.getattr(obj, attribute)

Subscribe an object from sandboxed code and prefer the attribute. The attribute passed must be a bytestring.