A more modern solution would be wslwinreg, which is a drop-in replacement for winreg:
wslwinreg
winreg
import wslwinreg as winreg