--- id: devtools version: "0.12.2" license: The MIT License (MIT) Copyright (c) 2017 to present Samuel Colvin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: dormant --- # devtools — Python's missing debug print command, and more. License: permissive · Maintenance: dormant · Downloads: 2.9M/mo ## What it is and what it does devtools is a debugging utility that replaces bare print statements with a smarter `debug()` function. When you call `debug(variable)`, it outputs the variable name, its value, and its type in a formatted, readable way—including the file and line number where the call was made. It handles complex nested structures (dicts, lists, numpy arrays, generators) with intelligent formatting and syntax highlighting via pygments. The package works by introspecting the call stack via asttokens and executing to extract the variable name from your source code, so you get both the name and the value without repeating yourself. It can also be injected into Python's `__builtins__` to make `debug()` available globally without an import. Use it for: - Inspect variable state during development without writing repetitive print statements. - Debug complex nested data structures with automatic pretty-printing and syntax highlighting. - Add file and line number context to debug output for faster location of statements in source code. - Temporarily replace print statements in scripts and notebooks while maintaining readable output. - Explore generator and iterator contents inline during interactive development. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a `debug()` function that prints variables with their names, types, and values in a readable format, replacing ad-hoc print statements during development. Yes, if you spend time debugging Python code interactively or in development. It's a low-friction, zero-security-risk utility that genuinely saves keystrokes and improves readability of debug output. The dormant maintenance is not a blocker—the package is stable and has no known vulnerabilities—but compatibility with Python versions beyond 3.11 is unverified. ## Install pip install devtools uv add devtools poetry add devtools ## Installing devtools Before you install: Low friction: pure Python wheel with three lightweight dependencies (asttokens, executing, pygments). Dormant maintenance status—last release was 2023-09-03 and no commits since 2025-01-24—but the package is marked Production/Stable and has seen no security issues. License in practice: MIT license (permissive): you can use, modify, and distribute this package freely in commercial or private projects with minimal restrictions. Quickstart: pip install devtools from devtools import debug whatever = [1, 2, 3] debug(whatever) Verify before relying: - Whether the package remains compatible with Python 3.12+ given dormant maintenance status. - Performance impact of debug() calls on large data structures or in tight loops. - Whether debug() can be injected into __builtins__ via sitecustomize.py as documented. ## Package facts - License: The MIT License (MIT) Copyright (c) 2017 to present Samuel Colvin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags debug print function, pretty print debugging, variable inspection tool, development print helper, python debug output, formatted debug printing, code inspection utility, debugging, repl-friendly, dev-tools [View on SkillFed](https://skillfed.io/packages/devtools) · [View on PyPI](https://pypi.org/project/devtools/)