blender-animation
Blender Animation
Overview
Create and control animations in Blender using Python: keyframe object and bone transforms, build armatures with IK rigs, animate shape keys, edit F-Curves, layer actions in the NLA editor and wire up drivers, all from a script.
Since Blender 4.4 an Action is layered and has slots: a slot says which data-block an Action animates, and the F-Curves live in a channelbag on a keyframe strip inside a layer. Blender 5.0 removed the old shortcuts action.fcurves, action.groups and action.id_root, so code from older tutorials raises AttributeError: 'Action' object has no attribute 'fcurves'. obj.keyframe_insert(...) still works unchanged and creates the action, slot and channelbag for you. Run scripts in the background:
blender --background --factory-startup --python animate.py
A factory-startup scene contains Cube, Camera and Light.