Trim Entries from a Python Dictionary
Project description
prune
- 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
Release history Release notifications | RSS feed
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.1.tar.gz
(1.9 kB
view details)
File details
Details for the file prune-0.0.1.tar.gz
.
File metadata
- Download URL: prune-0.0.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.0.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83f2022826eab19f6381ea55d36b80590c965b192418f303149172e90234bf4f |
|
MD5 | bc3f9f9f87b94c369f4506ca5cc04065 |
|
BLAKE2b-256 | 89a8f3adb81059cdc85eecbd53202d2a970ba0b1a134024ab741a51ef803a4fc |