mo-dots
More Dots! Dot-access to Python dicts like Javascript
What it is and what it does
mo-dots wraps Python dictionaries in a `Data` object that lets you access nested values using dot notation (like JavaScript) instead of bracket syntax. Instead of `data["a"]["b"]`, you write `data.a.b`. The key feature is null-safety: accessing a missing key returns a special `Null` object rather than raising a KeyError, allowing you to chain accesses without guards. You can also use dot-delimited path strings as keys—`data["a.b.c"]`—to access or assign deeply nested values without manually creating intermediate dictionaries.
The library depends on mo-future and mo-imports, both lightweight utilities. It supports Python 3.8 through 3.13 and has been actively maintained since its 2017 release. The design philosophy prioritizes consistency and brevity in data transformation code, avoiding exceptions during property access and providing a more uniform interface than standard Python dicts.
Use it for:
- Parse and manipulate JSON API responses with safe nested property access without defensive checks
- Build configuration objects where missing keys should default to Null rather than error
- Accumulate values into nested structures using += without pre-creating intermediate dicts
- Transform data pipelines where chaining property accesses should never raise exceptions
- Serialize data to JSON by passing the Data object through mo-dots' conversion utilities
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides null-safe dot-notation access to nested dictionaries and JSON-like data structures, replacing standard dicts with a `Data` object that supports both attribute and path-based access without raising errors on missing keys.
Yes. The package is stable (Production/Stable status), actively maintained, has no known vulnerabilities, and solves a real friction point in Python data handling. Low install friction and a clear use case for anyone working with nested dictionaries or JSON data. The copyleft license is a minor consideration only if you plan to distribute proprietary derivatives; using the library itself is unrestricted.
Install
mo-dots on PyPI
pip
pip install mo-dotsuv
uv add mo-dotspoetry
poetry add mo-dotsInstalling mo-dots
Before you install
Low friction: pure Python wheel with only two lightweight runtime dependencies (mo-future and mo-imports). Actively maintained as of 2026-07-31 with stable production status.
License in practice
Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. Derivative works and modifications must be distributed under the same license; proprietary use of the library itself is permitted.
Quickstart
from mo_dots import Data, to_data
# Create Data with named parameters
d = Data(b=42, c="hello")
print(d.b) # 42
# Convert existing dict
existing = to_data({"x": {"y": 10}})
print(existing["x.y"]) # 10
# Null-safe access
empty = Data()
print(empty.missing) # Null (no error)
Verify before relying
- Performance characteristics compared to standard dict operations (speed, memory overhead)
- Compatibility with type checkers and IDE autocomplete for dot notation
- Behavior when serializing nested Data objects to JSON beyond the documented default parameter approach
Package facts
| License | MPL 2.0 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — mo-future, mo-imports |
| Maintenance | actively maintained — 425 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 338,861/month — #7,429 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mo_dots-10.685.25166-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
dictorDictor provides a simplified interface for…
permissive · top 15,000 on PyPI
dotmapDotMap is a dict subclass that lets you access…
permissive · top 5,000 on PyPI
glomglom provides path-based access and declarative…
permissive · top 1,000 on PyPI
prodictProdict wraps Python dictionaries to allow…
permissive · top 15,000 on PyPI
python-json-configLoads JSON configuration files and provides…
permissive · top 15,000 on PyPI
json-normalizeRecursively flattens nested JSON-like…
permissive · top 15,000 on PyPI
python-boxBox wraps Python dictionaries to enable…
permissive · top 5,000 on PyPI
jsonasobj2Converts JSON data into Python objects with…
permissive · top 15,000 on PyPI
munchMunch provides a dictionary subclass that…
permissive · top 5,000 on PyPI
pathablePathable provides path-like objects for…
permissive · top 1,000 on PyPI