--- id: tuna version: "0.5.15" license: GPL-3.0-or-later license_treatment: copyleft maintenance: active --- # tuna — Visualize Python performance profiles License: copyleft · Maintenance: active · Downloads: 252.7K/mo ## What it is and what it does tuna is a lightweight Python profile viewer that reads output from Python's built-in cProfile and importtime profilers and displays them in an interactive web interface. It was designed as a modern alternative to SnakeViz, focusing on accuracy: it only displays timing information that can be reliably reconstructed from profile data, avoiding the incorrect call-tree reconstructions that SnakeViz produces. The tool uses d3 and bootstrap for visualization and has no runtime dependencies, making it quick to install and run. You generate a profile by running your Python code with cProfile or importtime, then pass the resulting file to tuna's command-line interface. tuna launches a web viewer showing the call tree, function timings, and performance bottlenecks. It also includes IPython magic commands for profiling code directly in notebooks, offering a drop-in replacement for the prun magic. Use it for: - Identify which functions consume the most CPU time in a Python application. - Analyze import-time performance to find slow module initialization. - Debug performance regressions by comparing profiles across code versions. - Visualize call hierarchies to understand which code paths dominate execution time. - Profile IPython/Jupyter notebooks using the tuna magic command. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. tuna visualizes Python performance profiles in an interactive web interface, showing runtime and import-time profiling data with minimal dependencies. Yes. tuna is actively maintained, has no runtime dependencies, supports current Python versions (3.10+), and solves a real problem—accurate profile visualization—that SnakeViz handles incorrectly. The GPLv3 license is a constraint for proprietary use but not a blocker for most development workflows. Install it if you need to understand where your Python code spends time. ## Install pip install tuna uv add tuna poetry add tuna ## Installing tuna Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of June 2026, with 1597 repository stars and regular releases since 2018. License in practice: GPLv3 copyleft license. Any derivative work or distribution must also be licensed under GPLv3; using tuna in proprietary projects requires careful consideration of linking and distribution obligations. Quickstart: pip install tuna python -mcProfile -o program.prof yourfile.py tuna program.prof Requires Python 3.10 or later. Verify before relying: - Whether the web interface requires a specific browser or JavaScript runtime to function. - Whether tuna can be used programmatically as a library or only as a CLI tool. - Performance characteristics when analyzing very large profile files. ## Package facts - License: GPL-3.0-or-later (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 252.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python profile visualization, performance profiling viewer, cprofile viewer, python runtime analysis, import time profiler, call tree visualization, performance bottleneck analysis, profiling, performance-analysis, visualization [View on SkillFed](https://skillfed.io/packages/tuna) · [View on PyPI](https://pypi.org/project/tuna/)