skillfed

munch

A dot-accessible dictionary (a la JavaScript objects)

munch v4.0.0 3.3M downloads/30d#2,670 on PyPI785
Permissive license MIT DORMANT released

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 munch

uv

uv add munch

poetry

poetry add munch

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Utilities

Tags

attribute access dictionarydot notation dictjavascript-style objects pythondict with attribute accessdynamic object attributesnested dict accessdict attribute wrapper
data-structuresdict-wrapperserialization

More Software Development packages