A userful package to use '.' to visit value of dict
Project description
dict_wrapper
===== user DictWrapper to visit the value like an object
Installing
Install and update using pip
_:
.. code-block:: text
pip install -U dict_wrapper
A Simple Example
.. code-block:: python
data = {
"who": 'your name',
"area": ['specify', 'china'],
"province": {
"city": ['shenzhen', 'guangzhou']
}
}
config = DictWrapper(data)
assert config.who == 'your name'
assert config.province.city == ['shenzhen', 'guangzhou']
print(config.area)
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
dict_wrapper-0.0.1.tar.gz
(1.3 kB
view hashes)
Built Distribution
Close
Hashes for dict_wrapper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3acee21155c86a0c5a20cd69f0be957f700c94af96ffa97d7682bb4dd140e3e |
|
MD5 | bc9bdf3235acbcc25cfb647712740214 |
|
BLAKE2b-256 | 81c54b95dcc69e1336b4a98474abfa86c08c5e689e35856f9c15fb560543b830 |