Simple Dotdict
The dotdict class is a dictionary that allows access to its elements using dot notation. It inherits from the built-in dict class in Python.
Installation
To install simple-dotdict, you can use pip:
pip install simple-dotdictUsage
Here is an example of how to use the dotdict class:
from simple_dotdict import dotdict
d = dotdict({'key': 'value'})
print(d.key) # Outputs: valueYou can also set and delete keys using dot notation:
d.new_key = 'new_value' # Sets a new key-value pair
print(d.new_key) # Outputs: new_value
del d.new_key # Deletes the key-value pairLicense
This project is licensed under the MIT License - see the LICENSE file for details.# simple-dotdict