Relatively recently, bloomberg open-sourced memray — the first memory profiler for Python that doesn’t suck. I especially like their pytest plugin. I tried it and it works pretty nicely, it already found a few places in my code where memory consumption can be a bit less aggressive.

If you need to profile execution time, py-spy is still the best.