I'm writing a pathfinding visualizer in python and Pygame. I intend to write a visualizer that can simultaneously simulate multiple pathfinding algorithms. I have two possible approaches

I write a server part of the application, that will calculate path and will send it to client part, that will use pygame to draw grid and render simulation.
I write a master thread, that will do pathfinding and will send information to grid thread using pipes.

Which approach should I use?
You're overthinking this.  Either method is fine, but you probably don't want to use threads for CPU-bound operations.  Use the multiprocessing module instead if you're shooting for concurrency.
But really, the pygame code should be negligible in terms of processing.  Focus on making your pathfinding efficient (perhaps implemented in C?) instead.
Pathfinding Visualizer in python