Python Hunter

Trace Python code execution with powerful filters and custom actions. Debug, log, and inspect code behavior without complex setup or storage.

Visit Python Hunter
A screenshot of Python HunterVisit

Hunter is a flexible Python code tracing toolkit designed for debugging, logging, inspection, and understanding complex code execution flows. It allows you to precisely control what gets traced and how it's presented.

Key features include:

  • Powerful Filtering: Utilize a flexible query Domain Specific Language (DSL) to filter trace events based on module name, function name, line number, source code content, variable values, or custom predicate functions. You can easily exclude standard library code or focus on specific parts of your application.
  • Customizable Actions: Define what happens when a filter matches. Built-in actions include CallPrinter (shows call/return flow), CodePrinter (displays executed source lines), and VarsPrinter (inspects local variables). You can even trigger a pdb session using the Debugger action at specific points.
  • Process Tracing: Attach to and trace other running Python processes, similar to strace (requires GDB or a small code addition using hunter.remote).
  • Environment Variable Activation: Easily enable tracing for an application run using the PYTHONHUNTER environment variable, configuring filters and actions directly from the command line.
  • Low Overhead: Designed for simplicity without IPC, threads, or persistent storage. An optional Cython extension provides improved performance for filtering.
Categories:

Tags:

Share:
Featured tools:

Similar to Python Hunter:

Databases for lazy people. Simple SQL data handling.
ORMsPython
Handle SQL data stores easily with implicit table creation, bulk loading, and transaction support. Makes database operations feel like working with JSON.
Build better web apps more quickly with less code.
Full-stack Web FrameworksPython
High-level Python web framework for rapid development and clean design. Handles common web development tasks, focusing on speed, security, and scalability.
IPython power for your Python debugging sessions.
DebuggingPython
Integrate IPython's enhanced features like tab completion, syntax highlighting, and better tracebacks into the standard Python debugger (pdb).
Visualize and debug distributed workflows.
DebuggingTracing
Monitor and troubleshoot request flows across complex distributed systems. Identify bottlenecks, trace errors, and analyze service dependencies.
Compress and transform data buffers efficiently in Python.
Data CompressionPython
Compress and transform data buffers in Python for efficient data storage and communication. Supports various codecs and integrates with array libraries.
Generate Python API docs instantly from your code.
DocumentationPython
Automatically generate API documentation for Python projects from existing docstrings. Supports type hints, cross-linking, and common docstring formats.
A small, expressive Python ORM for simpler database interactions.
ORMsPython
Build Python applications with a simple, expressive ORM. Supports PostgreSQL, MySQL, SQLite, and CockroachDB. Features easy model definition and powerful querying.
Simple, fast, file-based key-value storage for Python.
DatabasesPython
Store key-value data easily in Python with this lightweight, file-based library. Offers simple API, fast performance, and asynchronous support.
Query databases naturally with Python generators.
ORMsPython
Write database queries using Python generator expressions. Translates Python syntax trees to SQL for SQLite, MySQL, PostgreSQL, and Oracle. Features an ERD editor.

Command Menu