Not here to advise rewriting from scratch but I found myself considering using go/rust/c stuff instead of Python in the last few years. Less headache and more predictable