skillfed

dotmap

ordered, dynamically-expandable dot-access dictionary

dotmap v1.3.30 2.1M downloads/30d#3,285 on PyPI481
Permissive license MIT Active released

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 dotmap

uv

uv add dotmap

poetry

poetry add dotmap

Installing 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

dot notation dictionary accessdict with dot syntaxnested dict autovivificationordered dynamic dictionaryattribute-style dict accessdict subclass dot accesshierarchical dict creation
dict-wrappersyntax-convenience

More Utilities packages