--- id: objgraph version: "3.6.2" license: MIT license_treatment: permissive maintenance: active --- # objgraph — Draws Python object reference graphs with graphviz License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does Objgraph is a debugging tool that maps and visualizes the reference relationships between Python objects in memory. It helps developers hunt memory leaks by showing which objects hold references to which other objects, and can generate graphical representations of these relationships using graphviz. The package provides functions to count object types, track object growth over time, find reference chains between objects, and display backreferences—all useful when you need to understand why memory isn't being freed or which objects are keeping others alive. The package has no runtime dependencies in Python itself, making it lightweight to install. It integrates with graphviz for visualization and optionally with xdot for interactive graph exploration. It supports modern Python versions from 3.7 onward and has been actively maintained since 2009, with recent updates adding support for Python 3.12 and 3.13. Use it for: - Identify which objects are holding references to a suspected memory leak in a long-running application. - Visualize the reference graph between specific objects to understand unexpected memory retention. - Track object type growth over time to spot gradual memory accumulation during application execution. - Debug circular references and reference cycles that prevent garbage collection. - Analyze object relationships in complex Python programs to understand data structure interactions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Objgraph lets you visualize and explore Python object reference graphs, showing how objects reference each other in memory to help identify memory leaks and understand object relationships. Yes. Objgraph is a specialized but essential tool for memory debugging in Python. It has no runtime dependencies, is actively maintained, carries a permissive MIT license, and fills a clear niche in memory profiling that general-purpose tools don't address. Install it if you work on long-running Python applications or suspect memory leaks; skip it if you don't do memory debugging. ## Install pip install objgraph uv add objgraph poetry add objgraph ## Installing objgraph Before you install: Low install friction with no runtime dependencies. Actively maintained with recent releases supporting Python 3.13; last commit 2026-07-24 and 842 repository stars indicate ongoing care. License in practice: MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations. Quickstart: pip install objgraph import objgraph objgraph.show_most_common_types(limit=10) objgraph.show_refs([obj], filename='refs.png') Graphviz must be installed separately on your system to generate visual graphs; xdot is optional but recommended for interactive exploration. Verify before relying: - Whether the package works correctly with all supported Python versions (3.7–3.13) in your specific environment. - Performance characteristics when analyzing very large object graphs or long-running processes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python memory leak visualization, object reference graph, python object graph explorer, memory profiling graphviz, python garbage collection debug, object reference tracking, visualize python object references, memory-debugging, profiling, visualization [View on SkillFed](https://skillfed.io/packages/objgraph) · [View on PyPI](https://pypi.org/project/objgraph/)