dictor
an elegant dictionary and JSON handler
What it is and what it does
Dictor is a dictionary and JSON navigation utility that abstracts away the boilerplate of nested key lookups and exception handling. Instead of chaining dict.get() calls or writing try/except blocks to safely traverse nested structures, you pass a dot-separated path string to dictor() and receive the value at that location—or a fallback value if the key is missing. It handles lists within dicts, dicts within lists, case-insensitive key matching, custom path separators for keys containing dots, and key-based search across entire structures.
The package solves a common pain point in JSON and dictionary processing: safely extracting values from complex, unpredictable nested structures without defensive coding. It is most useful when parsing API responses, configuration files, or other external JSON data where the structure may vary or keys may be absent. No runtime dependencies means it installs cleanly into any Python environment.
Use it for:
- Extract nested values from API responses without repeated try/except blocks or chained .get() calls.
- Parse configuration files or JSON data with optional or variable structure, using fallback defaults.
- Search for all occurrences of a specific key across a deeply nested dictionary or list-of-dicts structure.
- Access list elements by index within a nested path (e.g., 'characters.Lonestar.items.0').
- Handle keys containing dots or special characters by using a custom path separator or escape sequences.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dictor provides a simplified interface for navigating and extracting values from nested dictionaries and JSON structures using dot-separated path notation, with built-in fallback handling for missing keys.
Yes, if you frequently work with nested JSON or dictionary structures and want to reduce boilerplate. No, if you need active maintenance—the project is dormant with last release on 2023-09-15. The high install friction (source-only distribution) is a minor drawback but not a blocker for most use cases.
Install
dictor on PyPI
pip
pip install dictoruv
uv add dictorpoetry
poetry add dictorInstalling dictor
Before you install
High install friction due to source-only distribution (no wheels). Maintenance is dormant—last release was 2023-09-15, though the repository remains active with a recent commit in 2023-09-19. No runtime dependencies.
License in practice
MIT license is permissive and places no restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install dictor
from dictor import dictor
import json
data = {"characters": {"Lonestar": {"id": 55923, "items": ["space winnebago"]}}}
print(dictor(data, 'characters.Lonestar.items.0'))
Python 2 support is being dropped in version 0.1.13 and later; verify your Python version compatibility if pinning to an older release.
Verify before relying
- Whether version 0.1.13 or later (with Python 2 support removed) has been released, given the fact sheet shows 0.1.12 as current.
- Actual Python version support range for the current release (requires_python is empty in metadata).
- Performance characteristics when handling very large nested structures or deeply nested paths.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 1,064 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 570,744/month — #5,954 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dictor-0.1.12.tar.gz
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
mo-dotsProvides null-safe dot-notation access to…
copyleft · top 15,000 on PyPI
dotmapDotMap is a dict subclass that lets you access…
permissive · top 5,000 on PyPI
flatdictFlattens nested dictionaries into single-level…
permissive · top 5,000 on PyPI
super-collectionsConverts nested JSON and YAML data into Python…
permissive · top 5,000 on PyPI
magicattrProvides nested attribute access and…
permissive · top 5,000 on PyPI
python-boxBox wraps Python dictionaries to enable…
permissive · top 5,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI
jsonquerylangExecutes queries against JSON data using a…
permissive · top 15,000 on PyPI