An extended version of [addict](https://github.com/mewwts/addict).
Project description
entity_addict
An extended version of addict.
It can be very useful as a decorator. It can be converted to Dict when the function returns a value. Can support a single dictionary, list dictionary, or multi deep dictionary of list.
install via pip
pip install entiry_addict
examples:
from entity_addict import entity_addict
@entity_addict
def get_dict_data_a():
return {"key_name": "value"}
data = get_dict_data_a()
print(data.key_name)
@entity_addict
def get_dict_data_b():
return [{"key_name": "value"}]
for data in get_dict_data_b():
print(data.key_name)
@entity_addict
def get_dict_data_c():
return [
{"key_name": "value"},
{"key": [{"sub_key1": 1}, {"sub_key2": 2}]}
]
data = get_dict_data_c()
print(data[1].key[1].sub_key2)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file entity_addict-1.2.1.tar.gz.
File metadata
- Download URL: entity_addict-1.2.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Linux/5.11.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eebbfdbc4ec449c12bdfb63a070196865c5b3e77e75b38c3e1551a722a57a49e
|
|
| MD5 |
23ad7525729129aa5632a5f9422a6344
|
|
| BLAKE2b-256 |
331dc11711620181226bb59184c264b303aa3bdf167def5bee6c95b12b01cfd2
|
File details
Details for the file entity_addict-1.2.1-py3-none-any.whl.
File metadata
- Download URL: entity_addict-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Linux/5.11.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed967519c0f5d5db1ff937df164b38c8d8521a7c9b53340f0847455006730a91
|
|
| MD5 |
45aa8572b0d06bab0e1bcd3947ab17a0
|
|
| BLAKE2b-256 |
43888b22bc8e34450dc593cc73698a425587a80133c05dcb093d9ad257030c2e
|