python over rotating cylinder I am trying to create a cylinder which is rotated 90˚ on the Y axis using, but the cylinder is over rotating to 5156˚.

Why is the cylinder over rotating and how can i rotate it only 90˚ ?

import bpy

object_size = 64.0
sce = bpy.data.scenes
for x in range(-4, 4):
    for y in range(-4, 4):
        for z in range(-1, 1):

            bpy.ops.mesh.primitive_cylinder_add(
                                location=(x, y, z),
                                rotation=(0, 90, 0),
                                radius=1.0/object_size,
                                depth=1,
                                vertices=8)


This is what the rotated cylinder looks like from the side.
When accessed via Python, all angles are in radians, not degrees.

rotation=(0, 90, 0),


If you want to write in degrees for convenience, you can use math.radians eg

rotation=(0, math.radians(90), 0),