HDR Resizing Help!

Hi, there
for a while i’ve been trying make my own hdr resizer using python and imagemagick (wand) but i’m pretty noob at coding so it didn’t work out.
What i’m asking is some sort of script/program that as soon as i input a file (20k hdr map) it resizes it into multiple resolutions that i choose once and outputs them in .hdr with full 32bits of color per channel.

If anyone knows or is able to make something like this it would really be awesome! Thanks, have a nice day!