Skip to main content

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.

Usage

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.

Installation

$ pip install prop

Similar libraries

License

MIT © Cristi Constantin.

Metadata

Release files for prop 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prop 0.0.2
File Size Uploaded
prop-0.0.2.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prop 0.0.2
File Interpreter ABI Platform
prop-0.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 8.3 kB

Release files / prop-0.0.2.tar.gz

Download URL prop-0.0.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5066b39a0e041f0b5da507dd90add1b1414cf7191f5625badd876eb56d76e5cf
BLAKE2b-256 checksum
How to use checksums
a014f12ead67e2308804b77bdb2c6fde03c196ec5eca544599711c9bae7ca83b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.9

Release files / prop-0.0.2-py2.py3-none-any.whl

Download URL prop-0.0.2-py2.py3-none-any.whl
Size 3.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b5cd79daf5bd7393203fe3b01ee57cb43c785c390d1e8ac893fb0ebfa76e3244
BLAKE2b-256 checksum
How to use checksums
d15a2d2f4432a8d20c07c28f40717029512c15a346481e397d06e7082e0cbf0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.23.4 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page