import bpy
import bmesh

def UpdateDuoSphere(obj, inner_radius, outer_radius):
    # Create mesh + object
    bm = bmesh.new();

    # First sphere (inner)
    bmesh.ops.create_uvsphere(
        bm,
        u_segments=16,
        v_segments=8,
        radius=inner_radius
    )

    # Second sphere (outer, same center)
    bmesh.ops.create_uvsphere(
        bm,
        u_segments=16,
        v_segments=8,
        radius=outer_radius
    )

    # Delete all faces (wireframe topology)
    bmesh.ops.delete(
        bm,
        geom=bm.faces,
        context='FACES_ONLY'
    )

    # Write to mesh
    bm.to_mesh(obj.data)
    bm.free()
