Skip to main content

Trim Entries from a Python Dictionary

Project description


  • Trim Entries from a Python Dictionary


pipenv install prune or pip3 install prune


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


Post an issue at or email the package author at

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 prune, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size prune-0.0.1.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page