skillfed

monty

Monty is the missing complement to Python.

monty v2026.7.16 952.4K downloads/30d#4,653 on PyPI
Permissive license Active released

What it is and what it does

Monty is a utility library that fills gaps in Python's standard library by providing reusable helper functions and design patterns. It offers transparent support for working with zipped files, implements common patterns like singleton and cached_class decorators, and collects solutions to problems that developers frequently encounter across scientific and general-purpose projects.

The package depends on ruamel.yaml and numpy, making it suitable for projects already using those libraries. It's classified as Beta (Development Status 4) and actively maintained, with support for current Python versions (3.11+). The library is intended as a complement to the standard library rather than a replacement, designed to reduce boilerplate and provide battle-tested solutions to recurring problems.

Use it for:

  • Implementing singleton or cached class patterns in scientific frameworks without writing custom decorators.
  • Transparently reading and writing files stored in zip archives without manual extraction.
  • Adding commonly needed utility functions to data processing pipelines that use numpy and ruamel.yaml.
  • Reducing boilerplate code in large Python projects by reusing well-tested design patterns.
  • Extending Python's standard library capabilities in development workflows where convenience matters.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Monty provides supplementary utility functions and design patterns that extend Python's standard library, including transparent zipped file support, singleton and cached class patterns, and other commonly needed tools.

Yes, if you're building scientific or data-heavy Python projects and want to reduce boilerplate with battle-tested utilities. The low install friction, permissive license, active maintenance, and zero known vulnerabilities make it a safe addition. The dependency on numpy and ruamel.yaml means it's most valuable in projects already using those libraries; if you're not, the overhead may not justify it.

Install

monty on PyPI

pip

pip install monty

uv

uv add monty

poetry

poetry add monty

Installing monty

Before you install

Low friction install with a pure-Python wheel. Actively maintained as of 2026-07-16. Depends on ruamel.yaml and numpy, both widely available.

License in practice

Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install monty

from monty.design_patterns import singleton

@singleton
class MyClass:
    pass

Requires Python 3.11 or later.

Verify before relying

  • What specific utility functions and design patterns are included beyond the examples mentioned (singleton, cached_class, zipped file support)
  • Performance characteristics or overhead of the utility functions compared to hand-rolled equivalents
  • Whether the package is suitable for production use or primarily for development convenience

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 2 — ruamel.yaml, numpy
Maintenance actively maintained — 29 days since the last release
First released
Downloads 952,390/month — #4,653 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: monty-2026.7.16-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules

Tags

python utility functionssingleton pattern implementationzipped file handlingpython standard library extensionscached class decoratorpython helper utilitiesdesign patterns library
design-patternsutilitiesscientific-python

More Python Modules packages