py-spy
« Back to VersTracker
Description:
Sampling profiler for Python programs
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: profiler python performance developer-tool flamegraph
Install: brew install py-spy
About:
PySpy is a command-line sampling profiler for Python programs that allows you to visualize the performance of your code without modifying it. It works by sampling the call stack of running Python processes at high frequency, providing accurate CPU usage statistics. The tool generates flame graphs and other visualizations to help pinpoint performance bottlenecks efficiently.
Key Features:
  • Zero-code instrumentation required
  • Generates interactive flame graphs
  • Low overhead sampling
  • Supports profiling of running processes
Use Cases:
  • Identifying CPU bottlenecks in production Python applications
  • Analyzing performance of long-running Python processes
  • Debugging slow Python scripts without code modification
Alternatives:
  • cProfile – Built-in Python profiler requiring code modification, less suitable for production
  • Austin – Similar sampling profiler with different visualization options
Version History
Detected Version Rev Change Commit