Explore nested structures -- dictionaries and lists
Project description
NestView
Explore nested structures in Python at various levels of granularity.
Examples
from nestview import nestview
from nestview import nestview
nested_struct = {
"orders": [
{
"id": "id1",
"quantity": 43,
"product": {
"id": "prodId1",
"name": "Prod 1",
"desc": "Description",
},
},
{
"id": "id2",
"quantity": 12,
"product": {
"id": "prodId1",
"name": "Prod 1",
"desc": "Description",
},
},
{
"id": "id3",
"quantity": 3,
"product": {
"id": "prodId2",
"name": "Prod 2",
"desc": "Description",
},
},
{
"id": "id4",
"quantity": 2,
"product": {
"id": "prodId1",
"name": "Prod 1",
"desc": "Description",
},
},
{
"id": "id5",
"quantity": 4,
"product": {
"id": "prodId1",
"name": "Prod 1",
"desc": "Description",
},
},
]
}
print(nestview(nested_struct))
gives
{'orders': '[25]'}
For the same structure with more details:
print(nestview(nested_struct, level=2))
gives
{'orders': ['{5}', '{5}', '{5}', '{5}', '{5}']}
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
nestview-0.1.1.tar.gz
(2.9 kB
view details)
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 nestview-0.1.1.tar.gz.
File metadata
- Download URL: nestview-0.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e09a3662cf872d459b93f4f36ac176a18383b82fc4d1df48c0f52e0608afe169
|
|
| MD5 |
7d4d132b137e1e727efe7d8ed5a539cb
|
|
| BLAKE2b-256 |
d07f044e254395a1f81551fc66bcdc138d10b18413ad5be19288dc7b105708a0
|
File details
Details for the file nestview-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nestview-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fad91e1fcd70b8790deecb0e49def3321605c136980469bd5465c58c654f6e52
|
|
| MD5 |
9b9a24eb3f0eb605140677a3168d709b
|
|
| BLAKE2b-256 |
69246006d19359fec37372b3d6c40194ce555e0b56c9944174ddd1de76109508
|