jsdict-py

Javascript-syle Dictionaries in Python


License
GPL-3.0
Install
pip install jsdict-py==1.0.1

Documentation

jsdict

Javascript-style Dictionaries for Python

Usage

from jsdict import JsDict

d = JsDict({"key1": 2, "key2": 3})

print(d.key1)
# 2
print(d)
# {'key1': 2, 'key2': 3}

d.key3 = {"key4": 5}
print(d)
# {'key1': 2, 'key2': 3, 'key3': {'key4': 5}}

d.key3.key5 = 6
print(d)
# {'key1': 2, 'key2': 3, 'key3': {'key4': 5, 'key5': 6}}