I have code that sets the bevel weight of selected edges in an object like this in Blender 3.3 LTS:
mesh = bpy.context.object.data
mesh.use_customdata_edge_bevel = True
for e in mesh.edges:
e.bevel_weight = 0.0 if e.select else 1.0
According to the newest Blender 4.0 release notes, these edge weights are now set with the Attribute API. I've played around and searched for a while now and haven't been able to figure out how to set edge weight based on selected edges with the new attributes API. The documentation and examples of the attributes API seem fairly minimal at the moment.
What would the syntax be to accomplish the above goal (setting edge weight based on selection) in the Blender 4.0 attributes API (within an addon's Python code)?