{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/3"}],"enrichment":{"capability":"line_profiler measures execution time on a per-line basis within Python functions, helping identify performance bottlenecks that function-level profilers miss.","skillfed_tags":["profiling","performance-debugging","kernprof"],"use_cases":["Identify which lines in a NumPy-heavy function consume the most time when function-level profiling shows only a single call.","Optimize data processing pipelines by pinpointing slow statements in tight loops that cProfile would not break down.","Debug performance regressions in scientific computing code by comparing line-level timings before and after changes.","Profile web request handlers or batch jobs to find unexpectedly slow operations within a single function.","Validate algorithmic improvements by measuring per-line execution time changes in critical functions."],"what_it_does":"line_profiler is a Python profiling module that measures execution time at the individual line level within decorated functions, complementing Python's standard cProfile which only times explicit function calls. This is particularly useful for identifying performance bottlenecks in scientific computing or data-heavy code where a single statement (like a NumPy array operation) can dominate runtime without appearing as a function call.\n\nThe package provides two main interfaces: the line_profiler module itself, which can be imported and used programmatically with the @line_profiler.profile decorator, and kernprof, a command-line script that automates profiling workflows. Modern versions (4.1.0+) support environment-variable-based activation via LINE_PROFILE=1, while legacy workflows use the kernprof command directly. Results are written to .lprof binary files and can be inspected via the command line or Python module.","worth_installing":"Yes. line_profiler is actively maintained, has no known vulnerabilities, runs on modern Python versions (3.8\u20133.14), and solves a real problem that standard profilers do not: identifying slow individual statements. Install friction is moderate but manageable via prebuilt wheels. The BSD license imposes no restrictions. It is a standard tool in the Python performance-debugging toolkit."},"id":"line-profiler","links":{"html":"https://skillfed.io/packages/line-profiler","md":"https://skillfed.io/packages/line-profiler.md","pypi":"https://pypi.org/project/line-profiler/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-02-23","license_spdx":null,"license_treatment":"permissive","name":"line-profiler","python_support":"supports_current","summary":"Line-by-line profiler"},"popularity":{"monthly_downloads":3069356,"position":2768,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"5.0.2"}
