Skip to main content

Library for parsing JSON lines.

Project description

prop · py

Pypi Version Build Status Code coverage Python ver

A Python 🐍 library for getting a property from a nested object using a dot path.


import prop

data = {
    'k1': 'v1',
    'nested': {'x': 'y', 'int': 0, 'null': None},
    'list': [[None, True, 9]]

prop.get(data, 'k1')
# v1

prop.get(data, 'nested.x')
# x

prop.get(data, 'list.0.1')
# True

prop.get(data, 'list.0.-1')
# 9

Limitations: For navigating dicts, only string keys are supported.


$ pip install prop

Similar libraries


MIT © Cristi Constantin.

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

prop-0.0.2.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

prop-0.0.2-py2.py3-none-any.whl (3.9 kB view hashes)

Uploaded py2 py3

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