--- id: yappi version: "1.7.6" license: MIT license_treatment: permissive maintenance: active --- # yappi — Yet Another Python Profiler License: permissive · Maintenance: active · Downloads: 4.3M/mo ## 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 above — 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 pip install yappi uv add yappi 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_current - Install friction: medium - Maintenance: active - Downloads: 4.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags multithreaded profiler, asyncio profiling, cpu time profiler, thread-aware profiler, gevent profiler, wall time profiling, python performance analysis, profiling, concurrency, performance-analysis [View on SkillFed](https://skillfed.io/packages/yappi) · [View on PyPI](https://pypi.org/project/yappi/)