dotmap
ordered, dynamically-expandable dot-access dictionary
What it is and what it does
DotMap is a lightweight dict subclass that enables dot-notation access to dictionary keys and values. Instead of writing m['key'], you write m.key, which is often more readable in code. The package automatically creates nested structures on access (m.people.steve.age = 31 works without pre-initializing the intermediate levels), supports initialization from regular dicts, and preserves insertion order for iteration.
It remains a true dict underneath, so you can mix dot and bracket notation freely, iterate over it, and convert back to plain dicts. The package has no external dependencies and installs as a pure Python wheel, making it a minimal addition to any project that wants cleaner dictionary syntax.
Use it for:
- Configuration objects where dot notation is more readable than nested bracket access
- Building hierarchical data structures dynamically without pre-defining the schema
- Converting JSON or dict-based API responses to objects with attribute-style access
- Simplifying code that accesses deeply nested dictionaries by using dot chains
- Prototyping data models where you want dict flexibility with object-like syntax
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
DotMap is a dict subclass that lets you access dictionary keys using dot notation (m.name instead of m['name']) with automatic nested structure creation.
Yes. DotMap is a stable, zero-dependency utility with permissive licensing, no known vulnerabilities, and active maintenance. Install it when you want cleaner syntax for dict access or need automatic hierarchy creation; skip it if you prefer explicit dict operations or are already using a full data-class library.
Install
dotmap on PyPI
pip
pip install dotmapuv
uv add dotmappoetry
poetry add dotmapInstalling dotmap
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent commit history and has been stable since its first release in 2015.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install dotmap
from dotmap import DotMap
m = DotMap()
m.name = 'Joe'
print(m.name) # Joe
print(m['name']) # Joe
Verify before relying
- Whether performance characteristics are documented for large nested structures
- Compatibility with modern Python versions (requires_python is unspecified)
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,591 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,114,498/month — #3,285 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dotmap-1.3.30-py3-none-any.whl
Keywords: dict, dot, map, order, ordered, ordereddict, access, dynamic
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
mo-dotsProvides null-safe dot-notation access to…
copyleft · top 15,000 on PyPI
dictorDictor provides a simplified interface for…
permissive · top 15,000 on PyPI
jsonasobj2Converts JSON data into Python objects with…
permissive · top 15,000 on PyPI
pluckyPlucky provides concise, safe access to deeply…
permissive · top 15,000 on PyPI
super-collectionsConverts nested JSON and YAML data into Python…
permissive · top 5,000 on PyPI
python-boxBox wraps Python dictionaries to enable…
permissive · top 5,000 on PyPI
easydictEasyDict wraps Python dictionaries to allow…
copyleft · top 5,000 on PyPI
odProvides shorthand syntax to create OrderedDict…
permissive · top 15,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI