How to move bones rest position from Python?
You have to access Armature.edit_bones, but they can only be accessed from EditMode.

Example of moving all bones rest positions.

# This script assumes you have an active armature in 'Object Mode'

import bpy
from bpy import context

obj = context.object

bpy.ops.object.mode_set(mode='EDIT')

for bone in obj.data.edit_bones:
    bone.head.y += 1.0
    bone.tail.y += 1.0

bpy.ops.object.mode_set(mode='OBJECT')


Note: instead of manipulating the head/tail directly, it can be more convenient to use EditBone.transform so you can use a transformation matrix to rotate/scale/translate - all at once.

To transform the entire armature, use Armature.transform