Registry / testing / pytest-item-dict

pytest-item-dict

JSON →
library1.3.7pypypiunverified

A pytest plugin that provides a hierarchical dict of session.items, enabling easy access to test items by node ID or custom keys. Current version 1.1.2, requires Python >=3.11. Released as needed.

pip install pytest-item-dict
INSTALL
IMPORT
SIG · PYTEST-ITEM-DICT
P
pytest-item-dict
testingpythonv1.3.7
Install
2.6s avg
Import
—
Disk
28MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.3.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 2.7s
py 3.12
✓ —
✓ 2.5s
py 3.13
✓ —
✓ 2.6s
py 3.9
✕ build_error
✕ build_error
28MB installed
● package 28MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

item_dict
✓ from pytest_item_dict import item_dict
✗ from pytest_item_dict import item_dict

Collect tests and get hierarchical dict.

import pytest from pytest_item_dict import item_dict pytest.main(['-v', '--collect-only']) # Access items via item_dict() items = item_dict() print(items.keys())
pytest --version
Debug
Known issues
gotchaitem_dict() can only be called after pytest session has collected items, typically after a test run or --collect-only.
fix
Ensure pytest session has run before calling item_dict().
affects: all
gotchaThe hierarchical dict keys are based on node IDs; custom keys require modifying the plugin.
fix
Use node IDs as keys or extend the plugin for custom keys.
affects: all
Upgrade
Version history
1.3.7latest on PyPI · released May 22, 2026
Audit
Dependencies
pytestrequiredPlugin extends pytest session
Agent activity
17 hits · last 30 days
node
14
Resources
pytest-item-dict — pip install pytest-item-dict · libregistry