skillfed

yappi

Yet Another Python Profiler

yappi v1.7.6 4.3M downloads/30d#2,346 on PyPI1,725
Permissive license MIT Active released

What it is and what it does

Yappi is a tracing profiler written in C that measures both CPU time and wall-clock time in Python programs. Unlike the standard library's cProfile, it is designed from the ground up to handle multithreaded applications, asyncio coroutines, and gevent greenlets, allowing you to start, stop, and retrieve profiling results at any point from any thread. It reports statistics per function and per thread, and can export results in callgrind or pstat formats for analysis in external tools.

You use yappi by calling start() before your code runs, then calling get_func_stats() or get_thread_stats() to retrieve results. It supports filtering and sorting by module, function name, or custom callbacks, making it practical for identifying bottlenecks in complex concurrent applications where standard profilers either fail or produce misleading timings.

Use it for:

  • Profile multithreaded applications to find which threads and functions consume the most CPU or wall time
  • Measure asyncio coroutine performance and identify context-switch overhead in async code
  • Profile gevent greenlet applications to track per-greenlet execution time and call counts
  • Export profiling results to callgrind format for visualization in kcachegrind or other analysis tools
  • Continuously profile long-running services by starting and stopping yappi on demand without restarting the application

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Yappi is a deterministic profiler for Python that tracks CPU and wall-clock time across multithreaded, asyncio, and gevent applications, reporting per-function and per-thread statistics.

Yes, if you need to profile multithreaded, asyncio, or gevent applications. Yappi is the standard choice for these workloads because the standard library profilers do not handle them correctly. If you only profile single-threaded code, cProfile is simpler. No security vulnerabilities are known, maintenance is active, and the MIT license poses no restrictions.

Install

yappi on PyPI

pip

pip install yappi

uv

uv add yappi

poetry

poetry add yappi

Installing yappi

Before you install

Medium install friction due to compiled C extensions requiring platform-specific wheels. The package is actively maintained with recent releases and has been stable since its early releases. No runtime dependencies to manage.

License in practice

MIT license is permissive; you can use, modify, and distribute yappi with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

import yappi

yappi.set_clock_type("cpu")
yappi.start()
# your code here
yappi.get_func_stats().print_all()
yappi.get_thread_stats().print_all()

Requires Python 3.6 or later; compiled C extensions are platform-specific, so installation pulls prebuilt wheels for your OS and Python version.

Verify before relying

  • Whether yappi's overhead is acceptable for production profiling of long-running services
  • Performance comparison with standard library cProfile on single-threaded workloads
  • Compatibility with Python 3.13 and 3.14 (listed in classifiers but not explicitly tested in examples)

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 150 days since the last release
Last repo commit
First released
Downloads 4,257,062/month — #2,346 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: yappi-1.7.6-cp310-cp310-macosx_10_9_x86_64.whl; yappi-1.7.6-cp310-cp310-macosx_11_0_arm64.whl; yappi-1.7.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; yappi-1.7.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; yappi-1.7.6-cp310-cp310-musllinux_1_2_aarch64.whl; yappi-1.7.6-cp310-cp310-musllinux_1_2_x86_64.whl; yappi-1.7.6-cp310-cp310-win32.whl; yappi-1.7.6-cp310-cp310-win_amd64.whl; yappi-1.7.6-cp310-cp310-win_arm64.whl; yappi-1.7.6-cp311-cp311-macosx_10_9_x86_64.whl; yappi-1.7.6-cp311-cp311-macosx_11_0_arm64.whl; yappi-1.7.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; yappi-1.7.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; yappi-1.7.6-cp311-cp311-musllinux_1_2_aarch64.whl; yappi-1.7.6-cp311-cp311-musllinux_1_2_x86_64.whl; yappi-1.7.6-cp311-cp311-win32.whl; yappi-1.7.6-cp311-cp311-win_amd64.whl; yappi-1.7.6-cp311-cp311-win_arm64.whl; yappi-1.7.6-cp312-cp312-macosx_10_13_x86_64.whl; yappi-1.7.6-cp312-cp312-macosx_11_0_arm64.whl

Keywords: python, thread, multithread, asyncio, gevent, profiler

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

multithreaded profilerasyncio profilingcpu time profilerthread-aware profilergevent profilerwall time profilingpython performance analysis
profilingconcurrencyperformance-analysis

More Libraries packages