$npx skillfedfor your agent

pytest-item-dict

Get a hierarchical dict of session.items

Worth itPyPI UtilitiesReleased May 2026177.2K downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pytest_item_dict-1.3.7-py3-none-any.whl
v1.3.7 · released 2026-05-22 · Python >=3.11 · 1 runtime deps: pytest

Yes. This is a focused, low-friction pytest plugin with active maintenance, no security vulnerabilities, and a dual permissive license. Install it if you need hierarchical test result aggregation, JSON export of test structure, or programmatic access to test outcomes grouped by suite/module/class. The Python >= 3.11 requirement is the only real constraint; if your project targets older Python, it won't work.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.11 and pytest >= 8.3.0
  • Low friction install with a single runtime dependency on pytest.
  • Active maintenance with a recent release; repository is not archived and receives commits.

License · maintenance · safety

(unclear) — Dual-licensed under BSD-3-Clause and Mozilla Public License 2.0. Both are permissive open-source licenses; you may use, modify, and distribute under either license's terms.

last release 2026-05-22 (84 days) · last repo commit 2026-05-22 · 1 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 177,248 downloads/mo, #10,217 on PyPI

Verify before relying

pip install pytest-item-dict

# conftest.py
from pytest_item_dict.plugin import ItemDictPlugin, ITEM_DICT_PLUGIN_NAME

def pytest_collection_finish(session):
    plugin = session.config.pluginmanager.get_plugin(name=ITEM_DICT_PLUGIN_NAME)
    if plugin:
        collect_hierarchy = plugin.collect_dict.hierarchy
  • Whether the plugin's performance impact is acceptable for large test suites with thousands of tests
  • Real-world usage patterns and adoption beyond the top-15000 PyPI tier
Same gist for agents: .md · .json

What it is and what it does

pytest-item-dict is a pytest plugin that transforms flat test collections into hierarchical dictionaries reflecting the directory, module, class, and function structure of your test suite. It provides two main dictionaries: collect_dict (populated after collection with test counts) and test_dict (populated during the run with outcomes, durations, and aggregated result counts). Every parent node automatically receives a @counts dict summing the outcomes of all leaf tests beneath it (passed, failed, skipped, executed, unexecuted, total) and optional @total_duration aggregates.

The plugin self-registers via the pytest11 entry point and requires no conftest changes for basic use. Access the hierarchies from any pytest hook via the plugin manager. Configuration options in pytest.ini or pyproject.toml let you control marker annotation, outcome recording, duration tracking, setup/teardown phase recording, and whether counts and durations bubble up through parent nodes. It is designed for test reporting, JSON export, and introspection of test structure and results during or after a run.

Use it for

  • Export test results as hierarchical JSON for custom reporting or CI/CD integration
  • Aggregate pass/fail/skip counts at the suite, module, or class level for summary dashboards
  • Track per-test and per-node execution time to identify slow test suites or bottlenecks
  • Inspect test collection structure programmatically from pytest hooks to validate test organization
  • Generate HTML or XML reports that preserve the hierarchical structure of your test suite

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a focused, low-friction pytest plugin with active maintenance, no security vulnerabilities, and a dual permissive license. Install it if you need hierarchical test result aggregation, JSON export of test structure, or programmatic access to test outcomes grouped by suite/module/class. The Python >= 3.11 requirement is the only real constraint; if your project targets older Python, it won't work.

Install

pytest-item-dict on PyPI

Before you install

Low friction install with a single runtime dependency on pytest. Active maintenance with a recent release; repository is not archived and receives commits.

Requires Python >= 3.11 and pytest >= 8.3.0

License in practice

Dual-licensed under BSD-3-Clause and Mozilla Public License 2.0. Both are permissive open-source licenses; you may use, modify, and distribute under either license's terms.

Quickstart

pip install pytest-item-dict

# conftest.py
from pytest_item_dict.plugin import ItemDictPlugin, ITEM_DICT_PLUGIN_NAME

def pytest_collection_finish(session):
    plugin = session.config.pluginmanager.get_plugin(name=ITEM_DICT_PLUGIN_NAME)
    if plugin:
        collect_hierarchy = plugin.collect_dict.hierarchy

Verify before relying

  • Whether the plugin's performance impact is acceptable for large test suites with thousands of tests
  • Real-world usage patterns and adoption beyond the top-15000 PyPI tier

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pytest
MaintenanceActively maintained 84 days since the last release
Last repo commit
First released
Downloads177,248 / month, #10,217 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: Utilities

Evidence: pytest_item_dict-1.3.7-py3-none-any.whl

Tags

Capabilities
pytest test hierarchy dictpytest collection tree structurepytest session items hierarchypytest test results aggregationpytest outcome tracking pluginpytest test reporting dicthierarchical test collection
Topics
pytest-plugintest-reportinghierarchical-results
PyPI keywords
collectiondicthierarchicalhierarchyitemsjsonoutcomespluginpytestreportreportingsession.itemssessiontest-resultstreexml

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “pytest test hierarchy dict”

  • pytest-item-dictA pytest plugin that builds hierarchical dictionaries mirroring the…
  • pytest-specpytest-spec is a pytest plugin that reformats test output to display…
  • pytest-describeA pytest plugin that organizes tests into nested describe-blocks,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also pytest-subtests · pytest-xml · pytest-durations · pytest-json · pytest-split · pytest-regressions · pytest-rich · pytest-logging · pytest-selenium · pytest-beartype-tests