Skip to main content

Nested Extensions to Python dictionaries

Project description

Home

https://img.shields.io/pypi/v/sndict.svg https://img.shields.io/travis/zphang/sndict.svg 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

History

0.1.2 (2019-05-02)

  • Remove Python 2 compatibility

0.1.1 (2017-03-15)

  • Minor functionality update:
    • unique_keys

    • to_tree_string

    • Improved filtering/indexing

    • Documentation

0.1.0 (2017-03-14)

  • Initial Version with basic functionality

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

sndict-0.1.2.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

sndict-0.1.2-py2.py3-none-any.whl (15.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sndict-0.1.2.tar.gz.

File metadata

  • Download URL: sndict-0.1.2.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

File hashes

Hashes for sndict-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6660791bb519df4b984f8891a944644f6cfc28a9041228d8da26b199a4657973
MD5 e8e9a25e37639e06852fe52c65bbb957
BLAKE2b-256 872d98fdb7fa49fc6071fa528375994c95b64bbf60726b07be60a4cb5db2fb74

See more details on using hashes here.

File details

Details for the file sndict-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: sndict-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

File hashes

Hashes for sndict-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d594a87ca21e1977dbfcd68e30943ce05861566362f753216a2480d2a936da18
MD5 411136db57caf7f1ff994d550994e734
BLAKE2b-256 77191071cf16a41a52efc1a3bad4516dc93b31bd52c81ee1cece95f0a47dc488

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