Dot.notation access for dictionaries
Project description
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-dotdict
Usage
Here is an example of how to use the dotdict class:
from simple_dotdict import dotdict
d = dotdict({'key': 'value'})
print(d.key) # Outputs: value
You 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 pair
License
This project is licensed under the MIT License - see the LICENSE file for details.# simple-dotdict
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 simple_dotdict-1.0.0.tar.gz.
File metadata
- Download URL: simple_dotdict-1.0.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9eb80d75708df7f3c83c5319f2000e4d42273256d5396255d07bc48069b9f277
|
|
| MD5 |
97369a4bdace29fc1196618a36a9b02a
|
|
| BLAKE2b-256 |
55f676baa5934220bbe43a8d915c59d4bd123be508f19e03fc3e3ee223ab0462
|
File details
Details for the file simple_dotdict-1.0.0-py3-none-any.whl.
File metadata
- Download URL: simple_dotdict-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fca8fbe94152f27dbdf42454a4f1da797090e1e10a0e588dfc9451c76272d08
|
|
| MD5 |
bf130616937ce01fa7cfe4efb8e82d11
|
|
| BLAKE2b-256 |
f9f763ed8fe5210673642de137f28ead90cbe9489a547a8e2030ef9afcdf7734
|