edit: forgot link - https://www.youtube.com/watch?v=K-KqkFkp55k
DISCLAIMER: I'm an author of cProfile competitor, vmprof
First you start profiler in remote mode
profiler.run(foo, 'cmh', args=(arg1, arg2), host='localhost', port=8000)
This will run profiler and send stats to server in JSON format.
(Ended up getting what I needed out of cProfile, which this also uses on the backend. Would've been nice to have the nice visualizations, though.)
This package uses cProfile, psutils, and pstats go get runtime information on your code as it's running. It's doing what valgrind does but in a much "higher-level" fashion, in pure Python. This means that it can give you more relevant information about your Python code.
Valgrind is essentially a VM, this uses cProfile - I wouldn't call that doing the 'same thing' at all.