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.3.tar.gz
(2.6 kB
view details)
File details
Details for the file dictop-0.1.3.tar.gz
.
File metadata
- Download URL: dictop-0.1.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02b20213e71b2ba0def3601ecdc14f66781e7a5cf96ca4485203d8659613358 |
|
MD5 | 6312e54e2796539bf5a88891d8a16145 |
|
BLAKE2b-256 | ab2e57d6bd58a0bde63385d924aa562ac7f88fac9e7790036449e7b0ceb1b186 |