# gaogaotiantian/dowhen

An intuitive and low-overhead instrumentation tool for Python

Repository: https://github.com/gaogaotiantian/dowhen
Canonical: https://ross.abutalabs.com/products/dowhen
Homepage: https://dowhen.readthedocs.io/
Language: Python
License: Apache-2.0
License Family: permissive
Last push: 2025-07-08T22:01:50+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 30, release rhythm 8, longevity 32
- inputs: {"age_days": 451, "days_push": 421, "days_rel": 433, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1205, forks 41 (observed 2026-08-28T04:03:59.290715+00:00)

## What it is
dowhen is a Python library for intuitive, low-overhead code instrumentation (monkeypatching). It lets you trigger callbacks—executing code, setting pdb breakpoints, or jumping to lines—at specific points in your own code, third-party libraries, or the stdlib.

## Use cases
- inject debug code into third-party library functions without editing them
- set a pdb breakpoint at a specific line of a library function
- change variable values at runtime to alter library behavior
- monitor when certain lines of code execute in production
- skip a line of code temporarily to test behavior
- patch stdlib functions for debugging without forking

## When to choose
- you need to debug or alter behavior of code you can't easily edit
- you want lightweight runtime instrumentation with minimal overhead
- you prefer declarative trigger/callback hooks over manual monkeypatching

## When to avoid
- you need permanent source-level changes rather than runtime hooks
- you're instrumenting non-Python code
- you need production-grade observability with metrics and dashboards rather than ad-hoc instrumentation

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, testing
- domain: developer-tools
- platform: python, cross-platform
- tags: instrumentation, monkeypatching, debugging, breakpoints, code-injection, low-overhead, python

## Member repositories
- gaogaotiantian/dowhen (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:59.290715+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:19:25.380478+00:00, confidence not recorded.
  - readme: https://github.com/gaogaotiantian/dowhen (fetched 2026-08-28T04:03:59.290715+00:00, sha 2c841669bc3f)
  - registry_pypi: https://pypi.org/pypi/dowhen/json (fetched 2026-08-29T12:27:40.466695+00:00, sha 99d912dcf107)
- Data as of 2026-08-30T08:39:29.467469+00:00.
