keke
Easy profiling in chrome trace format
Decision gist · record as of 2026-08-14
Yes, if you need lightweight Chrome trace format output for profiling. The low install friction, permissive MIT license, active maintenance, and minimal dependencies make it practical for inclusion in projects. Not suitable if you need line-level profiling (consider viztracer instead) or distributed tracing out of the box.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; development and linting tested on 3.10-3.12.
- Low install friction with a single runtime dependency (psutil).
- Active maintenance with recent releases; last commit 2026-04-07.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; suitable for vendoring into other projects.
last release 2025-02-17 (543 days) · last repo commit 2026-04-07 · 4 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 563,620 downloads/mo, #5,978 on PyPI
Alternatives
Verify before relying
pip install keke
import keke
from keke import kev
with keke.TraceOutput(file=open('trace.json', 'w')):
with kev('task_name', __name__):
# code to profile
pass- Whether psutil is required at runtime or only for optional features
- Exact performance overhead when tracing is enabled vs. disabled
- Compatibility with Python 3.7 despite requires_python>=3.8 claim in description
What it is and what it does
keke is a minimal trace-event writer that outputs performance profiling data in the Perfetto/Chrome trace format, readable in Chrome's about:tracing or Perfetto UI. It wraps code sections with context managers that record timing and metadata, then writes the results to a JSON file compatible with both tools.
The library is designed to be small enough to vendor into other projects and has near-zero overhead when disabled (by passing file=None). It supports basic distributed tracing through manual process coordination—you manage unique identifiers and file names across child processes, then merge traces afterward. It depends only on psutil and is licensed under MIT, making it suitable for inclusion in other projects.
Use it for
- Profile Python application performance and visualize execution timelines in Chrome DevTools
- Add lightweight tracing to CLI tools or services without heavy profiling overhead
- Coordinate multi-process tracing by passing trace file paths or identifiers to child processes
- Vendor into a project as a fallback profiling option without adding significant dependencies
- Identify performance bottlenecks in specific code sections with named trace spans
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight Chrome trace format output for profiling.
The low install friction, permissive MIT license, active maintenance, and minimal dependencies make it practical for inclusion in projects. Not suitable if you need line-level profiling (consider viztracer instead) or distributed tracing out of the box.
Install
keke on PyPI
Before you install
Low install friction with a single runtime dependency (psutil). Active maintenance with recent releases; last commit 2026-04-07.
Requires Python 3.8 or later; development and linting tested on 3.10-3.12.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for vendoring into other projects.
Quickstart
pip install keke
import keke
from keke import kev
with keke.TraceOutput(file=open('trace.json', 'w')):
with kev('task_name', __name__):
# code to profile
pass
Verify before relying
- Whether psutil is required at runtime or only for optional features
- Exact performance overhead when tracing is enabled vs. disabled
- Compatibility with Python 3.7 despite requires_python>=3.8 claim in description
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepsutil |
| Maintenance | Actively maintained 543 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 563,620 / month, #5,978 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: keke-0.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “chrome trace format profiling”
- kekeWrites trace events in Perfetto/Chrome trace format for performance…
- perfettoPerfetto is a Python binding for Perfetto's trace processor, allowing…
- barectfbarectf generates ANSI C tracers that output CTF (Common Trace…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also barectf · perfetto · viztracer · yappi · nvidia-nvtx · tuna · jaeger-client · pyleak · py-spy · segyio