Skip to main content

lookup a key in a deeply nested document of dicts and lists

Project description

https://img.shields.io/badge/pypi-0.0.3-green.svg https://img.shields.io/badge/coverage-100%-green.svg

A small Python library which enables key lookups on deeply nested documents.

Documents may be built out of dictionaries (dicts) and/or lists.

Make working with JSON, YAML, and XML document responses fun again!

install

install from pypi using pip:

pip install nested-lookup

or easy_install:

easy_install nested-lookup

or install from source using:

git clone https://github.com/russellballestrini/nested-lookup.git
cd nested-lookup
pip install .

tutorial

>>> from nested_lookup import nested_lookup

>>> document = [ { 'taco' : 42 } , { 'salsa' : [ { 'burrito' : { 'taco' : 69 } } ] } ]

>>> print(nested_lookup('taco', document))
[42, 69]

misc

license:
  • Public Domain

authors:
  • Russell Ballestrini

  • Douglas Miranda

web:

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

nested-lookup-0.0.3.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

nested_lookup-0.0.3-py2.7.egg (2.6 kB view hashes)

Uploaded Source

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