Can you mark seam with bmesh?
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)