pykdebugparser
Python parser for kdebug events
What it is and what it does
pykdebugparser is a specialized utility for parsing Darwin kernel debug (kdebug) trace events from iOS and macOS systems. It reads binary kdebug dumps generated by the ktrace utility and converts them into human-readable event logs, displaying timestamps, event names, function codes, process information, and raw event data. Unlike generic tracing tools like fs_usage or ktrace itself, pykdebugparser focuses on clean trace parsing and flexible output formatting.
The package works as both a command-line tool and a Python library, depending on your workflow. It depends on construct for binary parsing, pygments for syntax highlighting, click for CLI argument handling, and termcolor for colored terminal output. It supports Python 3.8 through 3.14 and has no known security vulnerabilities.
Use it for:
- Debug system-level I/O performance issues on macOS by parsing and analyzing kdebug traces from file system operations.
- Analyze kernel-level memory management events (MACH_vm_page_release, PMAP_flush_TLBS) to understand virtual memory behavior.
- Inspect system call sequences (BSC_pread, BSC_open, VFS_LOOKUP) to trace application behavior at the kernel level.
- Automate kdebug trace processing in CI/CD or performance testing pipelines using the Python API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses Darwin kdebug trace events from iOS and macOS systems, converting kernel debug output into readable formatted event logs with timestamps, function names, and raw event data.
Yes, if you work with macOS/iOS kernel-level tracing. The package is actively maintained, has no vulnerabilities, low install friction, and fills a specific niche for parsing kdebug events that other tools don't address as cleanly. Not relevant for non-Darwin platforms.
Install
pykdebugparser on PyPI
pip
pip install pykdebugparseruv
uv add pykdebugparserpoetry
poetry add pykdebugparserInstalling pykdebugparser
Before you install
Low friction: pure Python wheel with only four runtime dependencies (construct, pygments, click, termcolor). Actively maintained with a recent release and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution with only attribution required—no restrictions on commercial or proprietary use.
Quickstart
pip install pykdebugparser
from pykdebugparser import KdebugParser
parser = KdebugParser()
events = parser.parse('trace001.ktrace')
for event in events:
print(event)
Requires macOS or iOS kdebug trace files (generated via ktrace utility); not functional on non-Darwin systems.
Verify before relying
- Whether the package can parse trace files programmatically or only via CLI
- API stability and backward compatibility guarantees across versions
- Performance characteristics with large trace files
Package facts
| License | MIT License Copyright (c) 2021 Matan Perelman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — construct, pygments, click, termcolor |
| Maintenance | actively maintained — 41 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 322,598/month — #7,608 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pykdebugparser-1.2.8-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
mozcrashExtracts and formats stack traces from minidump…
copyleft · top 15,000 on PyPI
pyubx2Parses and generates UBX protocol messages from…
permissive · top 15,000 on PyPI
pymobiledevice3A pure Python library and command-line tool for…
copyleft · top 15,000 on PyPI
pycrashreportParses Apple crash reports (iOS, macOS) into a…
copyleft · top 15,000 on PyPI
icecreamIceCream provides a drop-in replacement for…
permissive · top 5,000 on PyPI
ipsw-parserParses and extracts data from iOS IPSW firmware…
copyleft · top 15,000 on PyPI
fb-idbA command-line and Python client for automating…
permissive · top 15,000 on PyPI
buildozerBuildozer turns Python applications into binary…
permissive · top 15,000 on PyPI
pystackPyStack inspects the stack frames of a running…
permissive · top 15,000 on PyPI
la-panicParses iPhone crash reports (IPS files) to…
copyleft · top 15,000 on PyPI