Can you mark seam with bmesh? I'm writing a script to make UV lighting maps for unreal... I got my script to spit out all the bmesh edge indexes but I can't figure out the best way to mark these as seams. (this is my first time using bmesh and I'm still having trouble understanding exactly how to use it)
BMesh edges have a seam property.

You can:

import bpy
import bmesh

mesh = bpy.context.object.data

bm = bmesh.new()
bm.from_mesh(mesh)

bm.edges.ensure_lookup_table()

bm.edges[0].seam = True

bm.to_mesh(mesh)