Skip to main content

PyInferno

Python package that renders pyinstrument profiles as flamegraphs, using the inferno rust crate.

Example command line usage Example output

Installation

Install from PyPi:

pip install pyinferno

Usage

Context manager

To profile a specific piece of code, you can use the pyinstrument Profiler class, then render the result using pyinferno's InfernoRenderer:

from pyinstrument.profiler import Profiler
from pyinferno import InfernoRenderer
import time

def slow():
    time.sleep(0.5)

with Profiler() as profiler:
    slow()

output = profiler.output(InfernoRenderer(title="slow"))

with open("flamegraph.svg", "w+") as f:
    f.write(output)

For convenience, the same result can be achieved using the InfernoProfiler context manager:

from pyinferno import InfernoProfiler
import time

def slow():
    time.sleep(0.5)

with InfernoProfiler(file="flamegraph.svg", auto_open=True, title="slow"):
    slow()

Command-line

To profile a Python script, you can pass pyinferno.Renderer as the renderer to the pyinstrument CLI:

pyinstrument -r pyinferno.Renderer -o flamegraph.svg slow.py

For convenience, pyinferno includes its own script which wraps the pyinstrument CLI:

pyinferno slow.py

If no output file is specified, the flamegraph will be written to a temporary file and automatically opened using python's webbrowser module. To save the flamegraph to a file, pass the -o option:

pyinferno -o flamegraph.svg slow.py

To profile a python module, pass the -m argument:

pyinferno -m pytest -k slow_test

Metadata

Release files for pyinferno 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyinferno 0.2.6
File Size Uploaded Provenance Actions
pyinferno-0.2.6.tar.gz 9.8 MB Without provenance Details for pyinferno-0.2.6.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyinferno 0.2.6
File Actions
pyinferno-0.2.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.9 PyPy 3.9 7.3 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.8 PyPy 3.8 7.3 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp311-none-win_amd64.whl CPython 3.11 none Windows x86-64 Details for pyinferno-0.2.6-cp311-none-win_amd64.whl
pyinferno-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details for pyinferno-0.2.6-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
pyinferno-0.2.6-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details for pyinferno-0.2.6-cp310-none-win_amd64.whl
pyinferno-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details for pyinferno-0.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
pyinferno-0.2.6-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details for pyinferno-0.2.6-cp39-none-win_amd64.whl
pyinferno-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details for pyinferno-0.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
pyinferno-0.2.6-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details for pyinferno-0.2.6-cp38-none-win_amd64.whl
pyinferno-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details for pyinferno-0.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
pyinferno-0.2.6-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details for pyinferno-0.2.6-cp37-none-win_amd64.whl
pyinferno-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details for pyinferno-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyinferno-0.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.7 CPython 3.7 pymalloc macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64 Details for pyinferno-0.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Total release size: 22.7 MB

Release files / pyinferno-0.2.6.tar.gz

Download URL pyinferno-0.2.6.tar.gz
Size 9.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a8dd0e2dadb724c8dcceb618a686e282200d1a1f4c1ab85c08db3f9c2de2f27d
BLAKE2b-256 checksum
How to use checksums
fd78cdabef86a6dc24a9fb8ac8f05ba2834fcbd31ecf983689b5efbe0242ea9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3
SHA-256 checksum
How to use checksums
e5e1af93d51ba254944f119881dd601518564d5688f339d21d769243687f56cc
BLAKE2b-256 checksum
How to use checksums
dbc62ed38ceee42b28df929360ab0cfe44c06028ef03529afbb26319a4342e3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3
SHA-256 checksum
How to use checksums
a51faf7b317796594cd102f2b391ee02ed7ffa82d2466806df7cf9b929e7af26
BLAKE2b-256 checksum
How to use checksums
30ba72a25e34361414e31ea426bf2cedb2627efa30fc96998ab01ad3fa283b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
72b0c0d33f9788d770ebc4791c7594effbbbb1c0ce8c1c2185f0902a466c70d8
BLAKE2b-256 checksum
How to use checksums
5de713fa0e97684a3895f18a77686db6de27a00be86580104397802be2305cb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp311-none-win_amd64.whl

Download URL pyinferno-0.2.6-cp311-none-win_amd64.whl
Size 189.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
0eda3ca7afff448a81d1836456344360c41400c539b994b8201982ae913af4a0
BLAKE2b-256 checksum
How to use checksums
bb12d0979ca9c294fb47cb0b5c9f52cf73392957e3cd834e6437730eef0be830
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
4890317a77e88ca26487551211cc519b23f239e93b008425b82a5961b7afe21a
BLAKE2b-256 checksum
How to use checksums
b44df912f892f88382ac9233cb3cea83df12a96f41a5c39a16d673fc77ca184c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL pyinferno-0.2.6-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 606.2 kB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
05f52b2afb50d8b8f771faa81e6daadd83599fc853a1c36916f9c3013b6fc077
BLAKE2b-256 checksum
How to use checksums
d00d7b4d937cfbf58b436a9eb64e361267fc9fb4265a2db1c69321a2517c4f3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp310-none-win_amd64.whl

Download URL pyinferno-0.2.6-cp310-none-win_amd64.whl
Size 189.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e0ceb8c3f6a6254338f40705fb6d462dffc165d5e77159d5420ee31d2d8d08fc
BLAKE2b-256 checksum
How to use checksums
f62b75ec49c817e61e23276febde9fcc9e918fb854e6f9e27d411ebd4ce7ad96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ccf9f4f466188c36625bd46884f1d857a7bf27d8e35aa46f914adeaaf5065704
BLAKE2b-256 checksum
How to use checksums
6cc67a319bdda223a52455232b97891749482d94cb436cc9a0dc6d5c75eeb2d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL pyinferno-0.2.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 606.2 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cb13c315431bc6b535dd6e68abf772770085b6d79f0f77a3a3cda55dac647264
BLAKE2b-256 checksum
How to use checksums
0999125eb752ca9e93ba976b3fe2a27487da7bb5ca1beceaa5a99f2169a37628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp39-none-win_amd64.whl

Download URL pyinferno-0.2.6-cp39-none-win_amd64.whl
Size 189.0 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
36168246c7fcc4aca59cc463bc454968ce75d4f027e974f25c4c4814423003ff
BLAKE2b-256 checksum
How to use checksums
99326e78b079773dced81797b257539972e64682a6ed95d64d14aecb56f97190
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8e304f7b78924d3e5a98fc2966e285b7e5b10d0f0e6450fb201ad77e8b13d8f5
BLAKE2b-256 checksum
How to use checksums
e99386c0883981055167f9cec80c0fbbe74b4f1c3e98b3ac8b0bdc91ec51495f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL pyinferno-0.2.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 606.2 kB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ad03786fb06caf3ba8c3f48b98f0d13988a69f639e34f9deaea9f9e3c873181b
BLAKE2b-256 checksum
How to use checksums
e19f2d8609828eb1eefc56757b6ab2abee23b3b33afd70365a1c190842ee1275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp38-none-win_amd64.whl

Download URL pyinferno-0.2.6-cp38-none-win_amd64.whl
Size 189.1 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
cac475260d60b1568ff4b1e0cc40f1c32c33ff4324651c9db134f21fca5a0e3c
BLAKE2b-256 checksum
How to use checksums
a679e54806c7700ff332899c05bb52823f60b6ce94dee774f2995ae0d41b73bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
33f481bae866bf41faa2444016ad7ceb76498db0674d644ee4e6435bd15c31c3
BLAKE2b-256 checksum
How to use checksums
d2fe7a941072372906ebd94ed15d2977448265374603d145b2c62647fc643bf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL pyinferno-0.2.6-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 605.5 kB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ffe6f16737ebafe879f35880a87b8a4d63721989208b1077bcf2cb4b95fef75e
BLAKE2b-256 checksum
How to use checksums
9234ab675d935eda57a302780d78dc230a0119e452ea0a812393c888854b463a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp37-none-win_amd64.whl

Download URL pyinferno-0.2.6-cp37-none-win_amd64.whl
Size 189.0 kB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
dcdbbe7905638b889562a262cdb0d2ae1a6a79b307151636814a97be1ffae29d
BLAKE2b-256 checksum
How to use checksums
979827e821727fce1902571a32040338cb1e122a5e8c22585a225de6b7dfb4fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyinferno-0.2.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3b725d8b06e6b54dd3b5689cc7ed3209226f1b5412ccc8eec10b53f508edad6f
BLAKE2b-256 checksum
How to use checksums
5b36a70f0bf74bc9d46a56b399134e5f57bdcd09371cdca3755c0894c252f62b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Release files / pyinferno-0.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL pyinferno-0.2.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 605.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d58f9421e29d51ae8e6aa0be191fc55adda9178faa120095e57f2bcd1214001d
BLAKE2b-256 checksum
How to use checksums
3777c660b0ebe85a5a74ab1db6df551410b398ee9548132d33cf3e25cce4c6e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.14.2

Security for pyinferno 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page