ndix

A lightweight solution for nested dicts that are both arbitrarily deep while having a pretty representation.


License
BSD-3-Clause
Install
pip install ndix==0.1.2

Documentation

ndix ✨

PyPI - Python Version PyPI

A lightweight solution for nested dictionaries that are both

  • arbitrarily deep,
  • while having a pretty representation.

Usage:

$ pip install ndix ( or $ poetry add ndix )

Initialize nested dict:

from ndix import Dict
d = Dict.nest()

# Populate dict with arbitrary nesting:  
d['first']['second']['third']['fourth']['fifth'] = 100 

# check d:
d 
>>> {'first': {'second': {'third': {'fourth': {'fifth': 100}}}}}