Which Python profiler fits your workload? Filter by focus, attach mode, and more; get a runnable command.
Project description
which-profiler
Which Python profiler fits your workload? Filter by focus, attach mode, and more; get a runnable command.
What it does
A filtered catalog: describe your workload (what you care about, attach
vs launch, target Python) and which-profiler narrows the options and
ranks the profilers by measured overhead. Each entry prints a
copy-paste-runnable uv-based command & useful information.
Install
uvx which-profiler # run without installing
uv tool install which-profiler
Only runtime dependency is typer. Runs on Python 3.10+.
Usage
which-profiler # interactive: one question, ranked catalog
which-profiler --nosy # interactive: also asks attach/python/native/view/rate
which-profiler --all # full landscape (incompatible tools tagged, not hidden)
which-profiler --focus time --python 3.15
which-profiler pytest # bare console-command target
which-profiler python -m my_module # same, python-invocation form
which-profiler --focus memory -- script.py --arg # script target after --
which-profiler --pid 12345 # attach-capable tools only
which-profiler --tool py-spy pytest # exactly this tool (py-spy or py_spy both work)
which-profiler --focus time --view flamegraph --run pytest # build + run top pick
which-profiler --focus time --json # machine-readable, no prompts
The talk
Come see "uvx which-profiler: Which Profiler, When?" at EuroPython 2026:
EuroPython 2026, Kraków
📍 Room S2
📅 Wednesday, 15 July 2026
🕐 15:25
👉 https://ep2026.europython.eu/session/uvx-which-profiler-which-profiler-when/
Potential profilers to include in the future
Development
Setup via mise:
mise run install
mise run fix
mise run check
mise run test # uv run pytest in dev venv (.venv, pinned to .python-version)
mise run test-all # full matrix: root tests on 3.10-3.15 + examples tests on 3.14
test-all runs scripts/test-matrix.sh, which tests each supported Python in
its own isolated venv under .venvs/py<version>/ (gitignored) so the shared
dev .venv is never resynced to a different interpreter. It prints a
python -> pass/fail/skip summary table at the end; 3.15 (still prerelease)
degrades a dependency-install failure to a recorded skip instead of a hard
failure.
Where the numbers come from
Overhead ranking is based on a benchmark from 2026-07-13:
ThinkPad X1 Carbon Gen5, all samplers forced to 100 Hz for
parity, median-of-7 repeats, over a tight numeric loop and a call-dense
workload. The CLI (and --json) only show the coarse category
(negligible/low/moderate/high); reproducible scripts and further measurements
will come later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file which_profiler-0.1.0.tar.gz.
File metadata
- Download URL: which_profiler-0.1.0.tar.gz
- Upload date:
- Size: 90.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
504e3a9678ccca92bf1c9408ea4b016adccc4ffc34024da2c12479ab2cd2740e
|
|
| MD5 |
050aed1815b5f92bc01a1ac3de70ca52
|
|
| BLAKE2b-256 |
94f270cd07296bf126e81984c7f44b907a2f061dd23de8401bc9e96208fd0eda
|
Provenance
The following attestation bundles were made for which_profiler-0.1.0.tar.gz:
Publisher:
publish.yml on jstriebel/which-profiler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
which_profiler-0.1.0.tar.gz -
Subject digest:
504e3a9678ccca92bf1c9408ea4b016adccc4ffc34024da2c12479ab2cd2740e - Sigstore transparency entry: 2172987415
- Sigstore integration time:
-
Permalink:
jstriebel/which-profiler@e0e6b21034576553e13b0612627e1ec4b515e036 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jstriebel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0e6b21034576553e13b0612627e1ec4b515e036 -
Trigger Event:
push
-
Statement type:
File details
Details for the file which_profiler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: which_profiler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6db12da740e4f5cd45683edda22608062b7c9fdae1c78f03af15bbf8037df5af
|
|
| MD5 |
c2cc192e430cfd795112b05023100826
|
|
| BLAKE2b-256 |
929e80af5e8c430177f90a2feede96ab6f2d5e1ea8c4985374f13a0aea3bbcb8
|
Provenance
The following attestation bundles were made for which_profiler-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jstriebel/which-profiler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
which_profiler-0.1.0-py3-none-any.whl -
Subject digest:
6db12da740e4f5cd45683edda22608062b7c9fdae1c78f03af15bbf8037df5af - Sigstore transparency entry: 2172987427
- Sigstore integration time:
-
Permalink:
jstriebel/which-profiler@e0e6b21034576553e13b0612627e1ec4b515e036 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jstriebel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e0e6b21034576553e13b0612627e1ec4b515e036 -
Trigger Event:
push
-
Statement type: