Using Bmesh to get the required coordinates.
import bpy, bmesh #first import bpy and bmesh
obj = bpy.context.active_object
if obj.mode == 'EDIT':
bm = bmesh.from_edit_mesh(obj.data)
vertices = bm.verts
else:
vertices = obj.data.vertices
verts = [obj.matrix_world * vert.co for vert in vertices] #this should get your coordinates as tuples.
plain_verts = [vert.to_tuple() for vert in verts]
for I in range(0,482):#where you'd like to set your bones i chose from 0 - 482 because i wanted to fill a sphere.
print(plain_verts[I])#so you can see your data
bpy.context.scene.cursor_location = (plain_verts[I])#move the cursor to the vertices position.
bpy.ops.object.armature_add()#this uses blenders menu method to add the bone, at the cursor.
After like 3 minutes of searching online I was able to find this, and by reading the commands in Blender easily figured out how to create a bone.
Is this not what you're looking for?
Or did you want to know how to join and rotate bones?
because that would be
bpy.data.objects['selectedbonesbones'].select = True
bpy.context.scene.objects.active = bpy.data.objects["selectedbonesbones"]
and look here to rotate the bones in pose mode.
If you want to rotate in object mode it should be something like
bpy.data.objects['armature'].rotation_euler[0] = 1
bpy.data.objects['armature'].rotation_euler[1] = 2
bpy.data.objects['armature'].rotation_euler[2] = 3
If you want to rotate in edit mode, well I haven't found anything very useful but you can try this, line 335 to 364. Tell me if it works!