BMesh Version
Create an icosphere using bmesh. Each vertex is then randomly rotated some amount from 0 to a maximum angle about a random axis.
Result of running script, with from left to right, 3, 4 and 5 degree maximum angles.
import bpy
import bmesh
from mathutils import Matrix
from math import radians
from random import uniform
context = bpy.context
# icosphere parameters, edit to suit.
diameter = 1
subdivisions = 4
max_angle = radians(5) # 5 degrees
bm = bmesh.new()
bmesh.ops.create_icosphere(bm,
subdivisions=subdivisions,
diameter=diameter)
# randomize
for v in bm.verts:
axis = [uniform(-1, 1) for c in "xyz"]
rot = Matrix.Rotation(uniform(0, max_angle), 3, axis)
v.co = rot * v.co
me = bpy.data.meshes.new("RandomIco")
ob = bpy.data.objects.new("RandomIco", me)
bm.to_mesh(me)
context.scene.objects.link(ob)
Alternatively rather than create an icosphere, can use in edit mode on any mesh to randomly move the radial from origin to vertex, keeping the distance (radius) same.
Result of running a 1 degree random move about 10 times on selected vertices of half icosphere

import bpy
import bmesh
from mathutils import Matrix
from math import radians
from random import uniform
context = bpy.context
ob = context.edit_object
me = ob.data
# randomise parameters
max_angle = radians(1) # 5 degrees
bm = bmesh.from_edit_mesh(me)
# randomize
for v in bm.verts:
if not v.select:
continue
axis = [uniform(-1, 1) for c in "xyz"]
rot = Matrix.Rotation(uniform(0, max_angle), 3, axis)
v.co = rot * v.co
bmesh.update_edit_mesh(me)
me.update()