dot-dict
A Python library for dot notation access to nested dictionaries.
Features
- Access nested dictionary values using dot notation
- Automatic creation of nested structures
- Compatible with standard dictionary operations
- JSON serialization support
- Lightweight and efficient
Installation
pip install dot-dict
Usage
from dotdict import DotDict
# Create a Dot object from a dictionary
data = {
"user": {
"name": "John",
"age": 30,
"address": {
"city": "New York",
"country": "USA"
}
}
}
dot_data = Dot(data)
# Access values using dot notation
print(dot_data.user.name) # Output: John
print(dot_data.user.address.city) # Output: New York
# Set values using dot notation
dot_data.user.age = 31
dot_data.user.email = "john@example.com"
# Automatic creation of nested structures
dot_data.settings.theme = "dark"
dot_data.settings.language = "en"
# Convert back to dictionary
dict_data = dot_data.to_dict()
# JSON serialization
print(str(dot_data))
Development
pytest
pytest
Setup
# Clone the repository
git clone https://git.xmov.ai/jiangbin/dot-dict.git
cd dot-dict
# Install development dependencies
pip install -e ".[dev]"
Upload
make upload-test
License
MIT License
Metadata
Release files for pyapikit 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyapikit-1.0.0.tar.gz | 9.5 kB | Without provenance | Details for pyapikit-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyapikit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyapikit-1.0.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / pyapikit-1.0.0.tar.gz
| Download URL | pyapikit-1.0.0.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d944a2cf019d1e7a29461a61d5cd3c04dd32fcfeea959f6c8f5ba90f8c2486ce
|
|
BLAKE2b-256 checksum How to use checksums |
553739e334886b1f1c1d099e348a17bae683aa5ae07660a4bc66933276c033eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.19
|
Release files / pyapikit-1.0.0-py3-none-any.whl
| Download URL | pyapikit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3acac8c02c206ba7e8a95d9a818bd6110452ef01e0444de3d10274ee6f0c24ac
|
|
BLAKE2b-256 checksum How to use checksums |
1e79387ca96d6a003ca941ab46964cb8120453ee5cc981f7c93a7b79463b9ce6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.19
|
Security for pyapikit 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.