$npx skillfedfor your agent

methodtools

Expand standard functools to methods

With conditionsPyPI Software DevelopmentReleased Feb 202311.2M downloads / moBSD 2-Clause LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — methodtools-0.4.7-py2.py3-none-any.whl
v0.4.7 · released 2023-02-05

Yes, if you need method caching and are not on Python 3.9+. For recent Python versions, verify first whether functools.lru_cache has addressed method caching natively; if not, methodtools is a straightforward, dependency-free solution. Dormant maintenance is acceptable for a stable, narrow-scope utility with no known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with no runtime dependencies.
  • Dormant maintenance (last release 2023-02-05, last commit 2024-08-23) but repository remains active and unarchived.

License · maintenance · safety

BSD 2-Clause License (permissive) — BSD 2-Clause License (permissive) — you may use, modify, and distribute freely with minimal restrictions; suitable for both open and closed projects.

last release 2023-02-05 (1286 days) · last repo commit 2024-08-23 · 85 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,178,756 downloads/mo, #1,412 on PyPI

Verify before relying

pip install methodtools

from methodtools import lru_cache

class A:
    @lru_cache()
    def cached_method(self, x):
        return x * 2
  • Whether functools32 is still required or recommended for Python 2 support in modern environments.
  • Performance characteristics compared to functools.lru_cache on modern Python versions.
  • Whether the package is actively maintained or if functools.lru_cache has since addressed method caching.
Same gist for agents: .md · .json

What it is and what it does

methodtools extends Python's standard functools module to handle caching on methods, classmethods, and staticmethods—scenarios where functools.lru_cache does not work as expected. The core feature is lru_cache, a decorator that caches function results but respects the lifetime semantics of different callable types: instance methods cache per object, classmethods and staticmethods cache per class, and regular functions cache globally.

The package solves a real problem: functools.lru_cache treats bound methods as distinct on each access, defeating the cache. methodtools detects the callable type and manages cache storage accordingly. It supports Python 2.7 through 3.11 and has no runtime dependencies, making it a lightweight drop-in replacement for functools when you need method caching.

Use it for

  • Cache expensive computations in instance methods where results depend on object state but should persist across calls.
  • Cache class-level computations (e.g., configuration parsing) that should be shared across all instances.
  • Cache pure utility functions defined as staticmethods without creating spurious cache misses on each call.
  • Migrate code from functools.lru_cache to methodtools when you discover caching is not working on bound methods.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need method caching and are not on Python 3.9+.

For recent Python versions, verify first whether functools.lru_cache has addressed method caching natively; if not, methodtools is a straightforward, dependency-free solution. Dormant maintenance is acceptable for a stable, narrow-scope utility with no known vulnerabilities.

Install

methodtools on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Dormant maintenance (last release 2023-02-05, last commit 2024-08-23) but repository remains active and unarchived.

License in practice

BSD 2-Clause License (permissive) — you may use, modify, and distribute freely with minimal restrictions; suitable for both open and closed projects.

Quickstart

pip install methodtools

from methodtools import lru_cache

class A:
    @lru_cache()
    def cached_method(self, x):
        return x * 2

Verify before relying

  • Whether functools32 is still required or recommended for Python 2 support in modern environments.
  • Performance characteristics compared to functools.lru_cache on modern Python versions.
  • Whether the package is actively maintained or if functools.lru_cache has since addressed method caching.

Package facts

LicenseBSD 2-Clause License permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 1,286 days since the last release
Last repo commit
First released
Downloads11,178,756 / month, #1,412 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: methodtools-0.4.7-py2.py3-none-any.whl

Tags

Capabilities
lru cache for methodsfunctools for class methodsmethod caching decoratorcache instance methodsclassmethod cachingstaticmethod cachingmethod memoization
Topics
cachingfunctools-extension
PyPI keywords
ringfunctoolslru_cachemethod

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “lru cache for methods”

  • methodtoolsProvides LRU caching for methods, classmethods, and staticmethods…
  • async-lruAn LRU cache decorator for async functions that deduplicates…
  • pylruProvides a pure-Python LRU (least recently used) cache with…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also backports.functools-lru-cache · cachetools · cached_method · memoization · asyncache · cachetools-async · functools32 · klepto · pytest-antilru · fan-tools