Skip to main content

Read line profiler reports into Polars DataFrames

Project description

polars-lprof

uv PyPI Supported Python versions License pre-commit.ci status

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.2.tar.gz (4.7 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.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_lprof-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polars_lprof-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e4aa05dd18da719c207b49e5887544997f6adc2576fc2e5d8a4fadd88b489bb0
MD5 9f7c7445c96077eb7d7238d01667c130
BLAKE2b-256 f3e9aab1a83f3d97b484b40c025c36871f904d837d0ea8869dc7267b7c7752f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_lprof-0.1.2.tar.gz:

Publisher: CI.yml on lmmx/polars-lprof

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: polars_lprof-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polars_lprof-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e51f7559a0823ab480cd38d10705b7214b2b9c4648246db73285e1e4f0b5f8fe
MD5 94272a70f91dcfecfeec9cecca6207d3
BLAKE2b-256 83a386e89602c8507ebc23defaa7fc60df71326a424c853d5b8ca75f1ab13d0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for polars_lprof-0.1.2-py3-none-any.whl:

Publisher: CI.yml on lmmx/polars-lprof

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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