Skip to main content

IPython Extension to pretty print nested dicts

Project description

Utilities to work with hierarchical dictionaries

When working with simulation data or simply creating data visualizations, I often find myself wishing for a readable representation of a nested structure. In python these are typically dicts containing dicts or something alike.

So, this is where this ipython extension comes in:

  • Tab completion across levels for benedicts (plain dicts asap)

tab_completion

  • Pretty printing dictionaries and similar types in a tree-like structure.
dict(
    lorem = "ipsum",
    first_level = dict(
        second_level = dict(
            some_entry = 8.15,
            another_entry = [0, 1, 2, 3, 4],
        )

    )
)
<class 'dict'>
├── lorem .................................... str  ipsum
└── first_level
    └── second_level
        ├── some_entry ..................... float  8.15
        └── another_entry ................... list  (5)

Install

Optional, but recommended

pip install python-benedict
pip install h5py

Required

pip install ipy_dict_hierarchy

In jupyter or ipython, to load manually

%load_ext ipy_dict_hierarchy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipy_dict_hierarchy-0.0.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

ipy_dict_hierarchy-0.0.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file ipy_dict_hierarchy-0.0.2.tar.gz.

File metadata

  • Download URL: ipy_dict_hierarchy-0.0.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for ipy_dict_hierarchy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 bdc36e9b79b98e4fd536a609ac03999e662b316e9bb1a3dc34869e2696c49a7f
MD5 172c21ea345df9727d7040f3fc8b4895
BLAKE2b-256 edbc31e739ca1483dedec09aeb95f0d44005347f2d1f915268f7c6f872600898

See more details on using hashes here.

File details

Details for the file ipy_dict_hierarchy-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ipy_dict_hierarchy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b7262bc76a03513bb7d85348b8b2642dae9479fac294399b9a5707c56380ae1
MD5 a9c7c21fc61c203b0b6615c5c9c9e103
BLAKE2b-256 6ff239e74b6d291a17ce8bf1d3409fee5716eb0de9117a970ca14f595c8001e7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page