Flat shaded mesh - missing separate colours/normals for connected vertices?
You’ll want to use “split normals”.


Set your faces to 'smooth' shading, and enable use_auto_smooth mesh option).
Compute the normals (mesh.calc_normals_split()).
Access them from loops (mesh.loops[0].normal).
Don’t forget to free them once you do not need them anymore (mesh.free_normals_split()).