SPyProf
Sampling line-by-line Python profiler.
Installation
pip install https://github.com/yuriiz/spyprof
Usage
Import spyprof module at startup:
import spyprof
Profiling reports will be written to spyprof directory periodically every 10 seconds and at application exit.
Profiling report measured with ITIMER_REAL timer will be written to spyprof/real.html.
Profiling report measured with ITIMER_PROF timer will be written to spyprof/prof.html.
Example
Running following code:
import math
from time import sleep
import spyprof
def foo():
"""
CPU time consuming code.
"""
for i in range(10**8):
math.sqrt(i)
math.sqrt(i)
pass
def bar():
"""
Real time consuming code.
"""
sleep(10)
if __name__ == "__main__":
foo()
bar()
Will result in the following reports:
| real.html | prof.html |
|---|---|
Metadata
Release files for spyprof 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spyprof-0.0.2.tar.gz | 3.9 kB | With provenance | Details for spyprof-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spyprof-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for spyprof-0.0.2-py3-none-any.whl |
Total release size: 8.0 kB
Release files / spyprof-0.0.2.tar.gz
| Download URL | spyprof-0.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
895ae517556175cfc665da8115cb15b87650a0489a9be80c9a2875ccbc1bb7e8
|
|
BLAKE2b-256 checksum How to use checksums |
4f442dc5b4206d2d85a761aacd30fc5261b0ec2005ff988eadfedab030fed77f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2025.
Transparency logRelease files / spyprof-0.0.2-py3-none-any.whl
| Download URL | spyprof-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ed30766f5066e14d494b73fd5a305f1a01f805f3b33bc57dd4bdb53032f4bcc
|
|
BLAKE2b-256 checksum How to use checksums |
0d8ee5fc285e6ce3ba1ec416f067a73b460a581ed18c2902893b6f24e705b464
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2025.
Transparency logSecurity for spyprof 0.0.2
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for spyprof-0.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2025.
Transparency logA 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.