{"id":27492,"library":"types-objgraph","title":"types-objgraph","description":"Typing stubs for the objgraph library, providing type hints for objgraph functions. Version 3.6.0.20260408 corresponds to objgraph 3.6.x. Released as part of typeshed, updated periodically.","status":"active","version":"3.6.0.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["type-stubs","objgraph","typeshed","typing"],"install":[{"cmd":"pip install types-objgraph","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency; stubs provide type hints for objgraph","package":"objgraph","optional":false}],"imports":[{"note":"types-objgraph is a stub package; you import objgraph directly","wrong":"","symbol":"*","correct":"import objgraph"}],"quickstart":{"code":"import objgraph\n\n# Count number of list objects\ncount = objgraph.count('list')\nprint(f\"Number of list objects: {count}\")\n\n# Show growth of objects between two points\nimport gc\ngc.collect()\nbefore = {id(o): o for o in gc.get_objects()}\n# ... some code ...\ngc.collect()\ndiff = objgraph.growth(limit=10)\nprint(diff)","lang":"python","description":"Basic usage of objgraph with type stubs. The stubs just provide type annotations; runtime behavior is unchanged."},"warnings":[{"fix":"Ensure 'objgraph' is in your dependencies (e.g., pip install objgraph).","message":"types-objgraph only provides type hints; it does not replace the objgraph runtime package. You must install objgraph separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Check typeshed updates or contribute missing stubs.","message":"The stub versions (3.6.0.20260408) mirror objgraph's version with a date suffix. Do not expect all objgraph 3.x features to be stubbed if the stub package is outdated.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'Any' or cast if strict type checking fails.","message":"Some objgraph functions like 'show_most_common_types()' may not have complete type annotations (e.g., return types partially unknown).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install --upgrade types-objgraph' and restart IDE.","cause":"Stale IDE cache or missing stub package.","error":"Cannot find reference 'count' in 'objgraph.pyi'"},{"fix":"Upgrade objgraph to >= 2.0 and ensure types-objgraph matches.","cause":"Using objgraph < 2.0 or stub not covering older versions.","error":"Module 'objgraph' has no attribute 'growth'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}