Skip to content
Structured Nested Dictionaries
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
sndict
tests
.gitignore
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
requirements.txt
requirements_dev.txt
setup.cfg
setup.py
tox.ini
travis_pypi_setup.py

README.rst

Home

Documentation Status Updates

Nested Extensions to Python dictionaries

Introduction

This module provides extensions to dicts in the python standard library, providing fast and clean manipulation of nested dictionary structures. This module exposes two new dict-types:

  • NestedDict/ndict: A light-weight wrapper for dict s that provides additional functionality for operations on nested dictionary structures.
  • StructuredNestedDict/sndict: A heavy-weight data dict -based structure for operating on hierarchical data with rich functionality for filtering and transformation across nested levels.

Both implementations are use OrderedDict s under the hood.

No additional dependencies are required.

Features

  • NestedDict/ndict:
    • Iterating over flattened keys and values
    • Nested getting/setting operations
    • Applicable to dictionaries of arbitrary and unbalanced depth
  • StructuredNestedDict/sndict:
    • flatten/stratify/rearrange methods allow for powerful and rich operations across different levels of hierarchy
    • Nested getting/setting operations, including intelligent filtering via ix
    • Convenient data inspection via dim, unique_keys, etc
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.