[AstroPy] Data Analysis and Programming in Python
phdu.header.update(kw,keywords[kw]). phdu.writeto(output).write_array(arr,outname,keywords). These 2 functions should allow you to read JPG images as numpy arrays and then write each array out to a separate FITS file using PyFITS.