Unlike Blackmagic Fusion or Apple Shake, there's no magical knob in The Foundry NUKE allowing you to change file's bit depth.

If you wanna change a bit depth of an input image, you have to render your sequence using a new bit depth value for datatype
property in Write node.
Here's how your code should look like:
import nuke
write = nuke.nodes.Write(file='/Users/nuker/file.%03d.exr', file_type='exr')
write['datatype'].setValue('16')
P.S.
Not all file types support 16-bit half-float
depth. But OpenEXR does support it. And I have to mention that all color grading and color correction operations in NUKE are performed in 32-bit float space, even if your files are 8-bit or 16-bit.