Skip to main content

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}}}

Project details


Release history Release notifications | RSS feed

This version

0.5

Download files

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

Source Distribution

subdict-0.5.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file subdict-0.5.tar.gz.

File metadata

  • Download URL: subdict-0.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for subdict-0.5.tar.gz
Algorithm Hash digest
SHA256 14ec7036c532d6e165325a76ce5b43ce8efa38c6ebc746407a3128be756ebac3
MD5 7e7aab78941b5ec78905d03dcc28396f
BLAKE2b-256 da33b4940bfec1cfd38127e4274639f9cd9c760886b9c7fdf3b3c6784066c752

See more details on using hashes here.

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