IDA has the
idc.SetType method that would accept a function start offset and a function prototype string and will set that function's prototype, although it will not set the function's name.
idc.SetType function is actually a convenience function around
ida_typeinf.apply_type, through a couple of other methods defined in the
idc module. If you wanna set both function name and prototype, you could use
idc.parse_decl to parse the prototype and then call
idc.set_name to set the prototype and name.
Reading the code I linked to around
idc.SetType really makes the API clear.
An example code could look something like this:
prototype_details = idc.parse_decl(PROTOTYPE, idc.PT_SILENT)
Naturally, you'll need to replace
FUNCTION_ADDRESS with the function's prototype and address, as well as implement this inside a loop. I'll leave this an an exercise for the reader.