munch
A dot-accessible dictionary (a la JavaScript objects)
What it is and what it does
Munch is a dictionary subclass that lets you access and set keys using attribute notation (dot syntax) in addition to standard dictionary bracket notation. It is a maintained fork of the Bunch package, designed to provide JavaScript-like object syntax for Python dictionaries while remaining fully compatible with dict methods and operations.
The package supports nested Munch objects, serialization to JSON and YAML (when those libraries are available), and variants like DefaultMunch and DefaultFactoryMunch for handling missing keys. It is pure Python, requires only importlib-metadata at runtime, and works across Python 3.6 through 3.11. The codebase is stable and production-ready, though development is dormant.
Use it for:
- Simplify config file handling by loading YAML or JSON into Munch objects and accessing values with dot notation instead of nested bracket syntax.
- Build API response wrappers where you want to treat JSON responses as objects with attribute access rather than raw dicts.
- Create lightweight data containers for function arguments or internal state without defining a full class.
- Serialize Python objects to JSON or YAML while maintaining readable attribute-style access during development.
- Replace repetitive dict key lookups in data transformation pipelines with cleaner dot-notation code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Munch provides a dictionary subclass that allows attribute-style access to keys, letting you read and write dictionary data using dot notation like JavaScript objects.
Yes. Munch is a small, stable, permissively licensed utility with zero security vulnerabilities and low install friction. It solves a real usability problem (dict attribute access) cleanly and is widely deployed. The dormant maintenance is not a concern for a mature, feature-complete package. Install it if you want to reduce dict-bracket noise in your codebase.
Install
munch on PyPI
pip
pip install munchuv
uv add munchpoetry
poetry add munchInstalling munch
Before you install
Low friction: pure Python wheel with only importlib-metadata as a runtime dependency. Maintenance is dormant (last release July 2023, last commit June 2024), but the package is stable and widely used; no active development needed for a mature utility.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install munch
from munch import Munch
b = Munch()
b.hello = 'world'
print(b.hello) # 'world'
print(b['hello']) # 'world'
Verify before relying
- Whether optional YAML serialization (via PyYAML) or JSON serialization features are actively tested in the dormant maintenance window.
- Real-world performance characteristics when working with deeply nested Munch structures.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — importlib-metadata |
| Maintenance | dormant — 1,140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,293,513/month — #2,670 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: munch-4.0.0-py2.py3-none-any.whl
Keywords: munch, dict, mapping, container, collection
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
easydictEasyDict wraps Python dictionaries to allow…
copyleft · top 5,000 on PyPI
super-collectionsConverts nested JSON and YAML data into Python…
permissive · top 5,000 on PyPI
jsonasobj2Converts JSON data into Python objects with…
permissive · top 15,000 on PyPI
mo-dotsProvides null-safe dot-notation access to…
copyleft · top 15,000 on PyPI
python-boxBox wraps Python dictionaries to enable…
permissive · top 5,000 on PyPI
json-fixPatches Python's built-in `json` module to…
permissive · top 15,000 on PyPI
aspy.yamlProvides order-preserving YAML loading and…
permissive · top 15,000 on PyPI
addictProvides a dictionary subclass that allows…
permissive · top 5,000 on PyPI
jsonasobjConverts JSON data into Python objects with…
permissive · top 15,000 on PyPI