Can i port it to python.
You can certainly try! But keep in mind that to keep it efficient you would want to run the shader code on a gpu