DICT-OPERATION allow you select data value from a dict-instance with dot separated path, and update.
Project description
DICT-OPERATION allow you select data value from a dict-instance with dot separated path, and update.
Install
pip install dictop
Usage
from dictop import update from dictop import select data = {} update(data, "a.b.c", 2) assert select(data, "a.b.c") == 2
Core Functions
select
select(target, path, default=None, slient=True)
update
update(target, path, value)
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
dictop-0.1.1.tar.gz
(2.5 kB
view details)
File details
Details for the file dictop-0.1.1.tar.gz
.
File metadata
- Download URL: dictop-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa4e33e0a7eece57c382ff197ea85739126f2455f62ac06164e49b1cd83efff9 |
|
MD5 | a0ffb4309434b7a605ae09eecc643e73 |
|
BLAKE2b-256 | ff41f0775f620a31402c7133117e9af51df42a82a4be16426178c478f9b8672a |