py-spy
Install
py-spy on PyPI
pip
pip install py-spyuv
uv add py-spypoetry
poetry add py-spyPackage facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 111 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: py_spy-0.4.2-py2.py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; py_spy-0.4.2-py2.py3-none-macosx_11_0_arm64.whl; py_spy-0.4.2-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; py_spy-0.4.2-py2.py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; py_spy-0.4.2-py2.py3-none-manylinux_2_5_i686.manylinux1_i686.whl; py_spy-0.4.2-py2.py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.whl; py_spy-0.4.2-py2.py3-none-win_amd64.whl
About py-spy
from the package's own PyPI description — quoted content, verbatim
py-spy: Sampling profiler for Python programs
Build Status (image) FreeBSD Build Status (image)
py-spy is a sampling profiler for Python programs. It lets you visualize what your Python program is spending time on without restarting the program or modifying the code in any way. py-spy is extremely low overhead: it is written in Rust for speed and doesn't run in the same process as the profiled Python program. This means py-spy is safe to use against production Python code.
py-spy works on Linux, OSX, Windows and FreeBSD, and supports profiling all recent versions of the CPython interpreter (versions 2.3-2.7 and 3.3-3.14).
Installation
Prebuilt binary wheels can be installed from PyPI with:
pip install py-spy
You can also download prebuilt binaries from the GitHub Releases Page.
If you're a Rust user, py-spy can also be installed with: cargo install py-spy. Note this
builds...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
py-spy is a sampling profiler for Python that visualizes program execution time without code modification or process restart. It runs as a separate Rust-based process with minimal overhead and supports profiling CPython 2.3–3.14 across Linux, macOS, Windows, and FreeBSD.
Medium install friction due to prebuilt binary wheels for multiple platforms (x86_64, ARM, aarch64, macOS universal). Active maintenance with recent release 111 days ago. No runtime dependencies simplifies deployment.
MIT license (permissive) allows commercial and private use with minimal restrictions, making py-spy suitable for production environments and proprietary codebases.
Usage
pip install py-spy
# Profile a running process:
py-spy record -o profile.svg --pid 12345
# Or profile a new Python program:
py-spy record -o profile.svg -- python myprogram.py
Requires OS-level process memory access; on macOS and some Linux configurations, must run with elevated privileges (sudo). libunwind-dev required on Linux/Windows if building from source via Rust.
Verdict: py-spy is a mature, production-ready profiler with zero runtime dependencies, permissive licensing, and active maintenance. Its out-of-process design and low overhead make it well-suited for profiling live services. Medium install friction is offset by broad platform coverage and prebuilt wheels.
Needs verification
- Community adoption and real-world usage patterns beyond repository star count.
- Whether prebuilt wheels cover all intended deployment architectures (e.g., musl-based Linux, non-standard ARM variants).
- Performance overhead quantification under various workload types and sampling rates.
- Specific Python version support claims (2.3–3.14) and whether all are equally well-tested in practice.
Similar packages
permissive · top 1,000 on PyPI
psutilpermissive · top 1,000 on PyPI
setproctitlepermissive · top 1,000 on PyPI
nvidia-nvtxunclear · top 1,000 on PyPI
nvidia-nvtx-cu12permissive · top 1,000 on PyPI
threadpoolctlpermissive · top 1,000 on PyPI
ddtracepermissive · top 1,000 on PyPI
asgirefpermissive · top 1,000 on PyPI
multitaskingpermissive · top 1,000 on PyPI
grpciopermissive · top 100 on PyPI