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.0.tar.gz
(2.5 kB
view details)
File details
Details for the file dictop-0.1.0.tar.gz
.
File metadata
- Download URL: dictop-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 809313bcf58a3fb8198e368f9812f98f84c88c5d53ef3f9c25a088202f346bfa |
|
MD5 | 01f67bf9c399a32cd466159f8acf7666 |
|
BLAKE2b-256 | 46b69565e1aef4d88de7b938fe8115f0ed659b74107811be4642ff367e4e1225 |