simple class that merge dictionary and object API
Project description
simple class that merges dictionary and object API
This Namespace objects work in a similar way as javascript objects.
usage:
from dictns import Namespace
n = Namespace(dict(a=1, b=3, c=dict(d=4)))
assert(n['a'] == n.a)
assert(n['c']['c] == n.c.d)
This Namespace objects work in a similar way as javascript objects.
usage:
from dictns import Namespace
n = Namespace(dict(a=1, b=3, c=dict(d=4)))
assert(n['a'] == n.a)
assert(n['c']['c] == n.c.d)
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
dictns-1.0.tar.gz
(2.8 kB
view details)
File details
Details for the file dictns-1.0.tar.gz
.
File metadata
- Download URL: dictns-1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a01ec608b8dd16b0945c03f6810c248a33ae10a4bfbf8b18755cc65af4518520 |
|
MD5 | e8a1a22ed83e22a61d457743934ee18b |
|
BLAKE2b-256 | e71481ccfb92ce53b0c21e698b5eb1228b0086686992566b68925d3f7de81cfa |