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.

Files for prop, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size prop-0.0.2-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size prop-0.0.2.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page