Skip to main content

Read line profiler reports into Polars DataFrames

Project description

polars-lprof

Read line_profiler reports into Polars DataFrames

Installation

The polars-lprof package can be installed with either polars or polars-lts-cpu using the extras by those names:

pip install polars-lprof[polars]
pip install polars-lprof[polars-lts-cpu]

If Polars is already installed, you can simply pip install polars-lprof.

Usage

Note: use this tool after running Python code with @line_profiler.profile decorators on functions which will output .txt plain text reports on the program's performance. The line_profiler tool relies on the environment variable set with export LINE_PROFILE=1.

First run your line_profiler (in whichever variations you want) and then use this tool to analyse the performance reports (named like profile_output_2025-02-04T002856.txt). The most recent one will always be called profile_output.txt but often we want to collect multiple for review.

plprof profile_output.txt

Use it from Python as a library:

from plprof import parse_lprof

metadata, lines = parse_lprof("profile_output.txt")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polars_lprof-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polars_lprof-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file polars_lprof-0.1.1.tar.gz.

File metadata

  • Download URL: polars_lprof-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.3 CPython/3.10.6 Linux/5.15.0-125-generic

File hashes

Hashes for polars_lprof-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ec774ad61c083c67a4f9663cfe198594b3d767e7b65340ea0e2d97012214b88
MD5 e2b2ee6c5f3423d8c0c830c2a285f41d
BLAKE2b-256 160e12262b04ded3d65d9743ab85e18c84ef91ec2280d35e4235a12d7fe3771a

See more details on using hashes here.

File details

Details for the file polars_lprof-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: polars_lprof-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.22.3 CPython/3.10.6 Linux/5.15.0-125-generic

File hashes

Hashes for polars_lprof-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1b34d26ca3133a5e80a172c10bea762713ea123e0b5dfca95ed53ca56c738cf
MD5 51c28dc9aeaa203c9f2c1d2bf7e3db93
BLAKE2b-256 aa9cc1aa41a7d8617695b4e18429bc717a5e8aeab3f31f8d59afaea6cc135028

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page