python package for NNI neighbors
Both the ETE Toolkit and DendroPy offer methods of node removal and reattachment - I would think it would be easy enough to hack together an NNI movement function with them. 

You could also investigate the source code of BioPython's NNITreeSearcher() function.