Skip to main content

:deciduous_tree: Trim Entries from a Python Dictionary

Project description

prune

:deciduous_tree: Trim Entries from a Python Dictionary

install

pipenv install prune or pip3 install prune

usage

from prune import prune

tree = { "ford": { "country": "USA", "year": "2005" }, "ferrari": { "country": "Italy", "year": "1995" }}
branches = ["ford.year", "ferrari.year"]
prune(tree, branches)
# tree is now { "ford": { "country": "USA" }, "ferrari": { "country": "Italy" }}

support

Post an issue at https://github.com/DanielJDufour/prune/issues or email the package author at daniel.j.dufour@gmail.com

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

prune-0.0.0.tar.gz (1.9 kB view hashes)

Uploaded Source

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