py-spy

Profile running Python programs with extremely low overhead. Visualize time spent without restarting or modifying code. Safe for production environments.

Visit py-spy

py-spy is a sampling profiler for Python programs that lets you visualize what your code is spending time on without restarting the program or modifying the code. It's written in Rust for speed and runs in a separate process, resulting in extremely low overhead. This makes it safe to use against production Python code.

Key features include:

  • Works on Linux, macOS, Windows, and FreeBSD.
  • Supports CPython versions 2.3-2.7 and 3.3-3.13.
  • No code modification or program restarts required.
  • Three operating modes:
    • record: Saves profiling data to a file (e.g., interactive SVG flame graphs).
    • top: Displays a live, updating view similar to the top command.
    • dump: Shows the current call stack for each thread, useful for debugging hangs.
  • Optional profiling of native C/C++/Cython extensions.
  • Ability to profile subprocesses (e.g., multiprocessing or gunicorn workers).
  • GIL usage reporting and filtering.

Tags:

Share:
Featured tools:

Similar to py-spy:

Databases for lazy people. Simple SQL data handling.
ORMsPython
Handle SQL data stores easily with implicit table creation, bulk loading, and transaction support. Makes database operations feel like working with JSON.
Build better web apps more quickly with less code.
Full-stack Web FrameworksPython
High-level Python web framework for rapid development and clean design. Handles common web development tasks, focusing on speed, security, and scalability.
IPython power for your Python debugging sessions.
DebuggingPython
Integrate IPython's enhanced features like tab completion, syntax highlighting, and better tracebacks into the standard Python debugger (pdb).
Visualize and debug distributed workflows.
DebuggingTracing
Monitor and troubleshoot request flows across complex distributed systems. Identify bottlenecks, trace errors, and analyze service dependencies.
Compress and transform data buffers efficiently in Python.
Data CompressionPython
Compress and transform data buffers in Python for efficient data storage and communication. Supports various codecs and integrates with array libraries.
Generate Python API docs instantly from your code.
DocumentationPython
Automatically generate API documentation for Python projects from existing docstrings. Supports type hints, cross-linking, and common docstring formats.
A small, expressive Python ORM for simpler database interactions.
ORMsPython
Build Python applications with a simple, expressive ORM. Supports PostgreSQL, MySQL, SQLite, and CockroachDB. Features easy model definition and powerful querying.
Simple, fast, file-based key-value storage for Python.
DatabasesPython
Store key-value data easily in Python with this lightweight, file-based library. Offers simple API, fast performance, and asynchronous support.
Query databases naturally with Python generators.
ORMsPython
Write database queries using Python generator expressions. Translates Python syntax trees to SQL for SQLite, MySQL, PostgreSQL, and Oracle. Features an ERD editor.

Command Menu