Skip to main content

Object-oriented dictionary paths

Project description

About

Object-oriented dictionary paths

Key features

  • Traverse resources like paths

  • Access resources on demand with separate accessor layer

Usage

from dictpath import DictPath

d = {
    "parts": {
        "part1": {
            "name": "Part One",
        },
        "part2": {
            "name": "Part Two",
        },
    },
}

dp = DictPath(d)

# Concatenate paths with /
parts = dp / "parts"

# Stat path keys
"part2" in parts

# Open path dict
with parts.open() as parts_dict:
    print(parts_dict)

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

dictpath-0.1.3.tar.gz (8.1 kB view hashes)

Uploaded source

Built Distributions

dictpath-0.1.3-py3-none-any.whl (8.4 kB view hashes)

Uploaded py3

dictpath-0.1.3-py2-none-any.whl (8.4 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page