Skip to main content
Help us improve Python packaging – donate today!

Extract subdicts from python dicts by just specifying which keys are needed, in a dotted-syntax.

Project Description

Build Status Code Health Coverage Status

The intent of this library is to make it easy to extract subdicts from python dicts by just specifying which keys are needed, in a dotted-syntax.

Example

>>> from subdict import extract_subdict
>>> d = {'a': 1, 'b': 0, 'c': {'ca': '3', 'cb': {'cba': 0, 'cbb': False}}}
>>> extract_subdict(d, ['a', 'c.cb.cbb'])
{'a': 1, 'c': {'cb': {'cbb': False}}}

Release history Release notifications

This version
History Node

0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
subdict-0.5.tar.gz (3.0 kB) Copy SHA256 hash SHA256 Source None Jul 21, 2015

Supported by

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