It’s fine to load the other blend as a library (appending the object data for the armature), but whether you should do so depends on your workflow and use case. If you’re moving a single character to multiple copies, it might be better to externalize the bones to a text file or a pickle archive and go from there.
Maybe this bit of code can be of help. It looks in the same folder as the saved .blend for a JSON file, loads it, then steps through and sets all the bones. It’s not creating new bones at all, so if one is missing it’ll fail.
import json, os
op = bpy.context.active_object
fn = os.sep.join( [bpy.data.filepath.rpartition(os.sep), 'bones.json'] )
with open(fn, 'r') as fp:
data = json.load(fp)
for b, values in data.items():
head = values['head']
tail = values['tail']
roll = values['roll']
eb = op.data.edit_bones[b]
eb.head = head
eb.tail = tail
eb.roll = roll
print(">> Bones loaded from %s." % fn)
If you do go the library linking route, it should be similar-- position the head and tail, set parent if necessary, and then adjust rolls. I recommend saving rolls as a world space vector, which I did not do in this code; I found that they didn’t always line up perfectly unless I oriented the bones manually after placement.
I also found I had to run [object].update_from_editmode() and [scene].update() at times to make edits stick.