Sorry if this has already been posted. But someone named naehrwert has released some python tools. I don't know what it does but I thought I should post a thread about it
https://github.com/naehrwert/p3ds
https://github.com/naehrwert/p3ds