Set loop normals

I found a method which do the job in Object mode but I can’t find the way of how this could be done in Edit mode.
It’s possible to set vertex normals for meshes in edit mode in this way.

    for n, v in zip(normals, bm.verts):
        v.normal = n

But loop.normal is just not exposed in Bmesh API.
Is there any way of doing this?

if memory serves it’s stored as a BMLayerAccessLoop’s float_vector attribute

edit: I might be wrong- it may not actually be possible to set custom split normals via bmesh, storing them as a float_vector layer would be the obvious solution but it does not appear that they exist. I put together this simple test script and ran it on an object that has face weighted normals applied to it and the float_vector layer was uninitialized

import bpy, bmesh

obj = bpy.context.active_object
bm = bmesh.from_edit_mesh(

vec_layer = bm.loops.layers.float_vector

    for f in bm.faces:
        for l in f.loops:
except AttributeError:
    print("there is no custom float_vector data stored in loops.layers")    

sorry, wish i had better news- maybe somebody else has a better idea

I think float_vector layer serves for storing custom attributes on loops or other mesh elements. If manipulating with loops normals was available via layers it would be some build-in layer like it is with UV coordinates attribute.
I would expect something like this API:

normal_layer = bm.loops.layers.normal
for n, l in zip(normals, bm.loops):
    l[normal_layer].normal = n

But actually this does not have sense to store normals in layers because a mesh elements can only have one normal. So in this case it would be much easier to get excess to normals in this way loop.normal = my_normal

well, technically Blender already has a need for more than one layer of normals. If you want to switch between custom split normals and your base calculated normals, currently you have to clear them (at which point you’ve lost your split normals forever unless you cached them off somewhere). The need is rare, but it exists.