finds.dev← search

// the find

samuelcolvin/python-devtools

★ 1,080 · Python · MIT · updated Jan 2025

Dev tools for python

python-devtools gives you a `debug()` function that prints variable names, types, and values together — the thing Python's built-in `print()` should have been. It also includes a `timer` context manager, ANSI color output, and a `prettier` formatter for complex nested structures. Aimed squarely at developers who spend time in Python REPLs or adding temporary debug prints.

The core `debug()` output is genuinely useful: it extracts the variable name from the call site via AST inspection so you see `whatever: [1, 2, 3] (list)` instead of `[1, 2, 3]`. The `insert_assert` feature can write `assert` statements into your source file automatically, which is a real time-saver when building test fixtures. It handles numpy arrays, generators, and deeply nested structures better than pprint. The pytest plugin integration means debug output is suppressed unless the test fails, which is the right default.

Last commit is January 2025 and activity is sparse — this looks like maintenance mode, not active development. The docs site URL in the README (helpmanual.io) has been dead for a while, which is a bad sign for a library whose main pitch is usability. At 1080 stars it's not widely adopted, and rich's `inspect()` and `print()` cover most of the same ground with an actively maintained project behind them. The AST-based variable name extraction is clever but fragile in edge cases like lambdas or multiline expressions.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →