$npx skillfedfor your agent

backports.functools-lru-cache

Backport of functools.lru_cache

With conditionsPyPI Software DevelopmentReleased Dec 20231.7M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — backports.functools_lru_cache-2.0.0-py2.py3-none-any.whl
v2.0.0 · released 2023-12-13 · Python >=3.8

Yes, if you need function caching and must support Python versions before 3.2, or if you want a single import pattern across multiple Python versions. However, verify whether your actual minimum Python version truly requires this backport—Python 3.8+ already includes functools.lru_cache natively, making this package redundant for most modern codebases.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later.
  • Low install friction with a single pure-Python wheel dependency.
  • Actively maintained as of 2026-04-13 with stable production status.

License · maintenance · safety

permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

last release 2023-12-13 (975 days) · last repo commit 2026-04-13 · 37 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,705,926 downloads/mo, #3,635 on PyPI

Verify before relying

pip install backports.functools-lru-cache

try:
    from functools import lru_cache
except ImportError:
    from backports.functools_lru_cache import lru_cache
  • Whether this backport is still necessary given the stated Python 3.8+ requirement, since functools.lru_cache has been available since Python 3.2.
  • Specific use cases where the standard library version is unavailable despite meeting the Python 3.8+ minimum.
Same gist for agents: .md · .json

What it is and what it does

This package backports the lru_cache decorator from Python 3.3's functools module, allowing developers to use function result caching via a simple decorator on Python versions that lack it. The decorator caches function results based on input arguments, avoiding redundant computation for repeated calls with the same parameters.

The package is designed for compatibility scenarios where code must run on Python versions predating lru_cache's introduction. It follows the standard import-fallback pattern: code attempts to import from the standard library first, then falls back to this backport if unavailable. With zero runtime dependencies and a permissive MIT license, it introduces minimal overhead to any project that includes it.

Use it for

  • Caching expensive computations (database queries, API calls, mathematical calculations) in long-running applications.
  • Providing function result caching in libraries that must support multiple Python versions via a single import.
  • Optimizing recursive algorithms by caching intermediate results to reduce redundant computation.
  • Reducing redundant I/O operations in utilities that repeatedly call the same function with overlapping parameters.
  • Ensuring consistent behavior across codebases that target both older and modern Python versions.

Worth the install?

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

With conditions

Yes, if you need function caching and must support Python versions before 3.2, or if you want a single import pattern across multiple Python versions.

However, verify whether your actual minimum Python version truly requires this backport—Python 3.8+ already includes functools.lru_cache natively, making this package redundant for most modern codebases.

Install

backports-functools-lru-cache on PyPI

Before you install

Low install friction with a single pure-Python wheel dependency. Actively maintained as of 2026-04-13 with stable production status.

Requires Python 3.8 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects.

Quickstart

pip install backports.functools-lru-cache

try:
    from functools import lru_cache
except ImportError:
    from backports.functools_lru_cache import lru_cache

Verify before relying

  • Whether this backport is still necessary given the stated Python 3.8+ requirement, since functools.lru_cache has been available since Python 3.2.
  • Specific use cases where the standard library version is unavailable despite meeting the Python 3.8+ minimum.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 975 days since the last release
Last repo commit
First released
Downloads1,705,926 / month, #3,635 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3

Evidence: backports.functools_lru_cache-2.0.0-py2.py3-none-any.whl

Tags

Capabilities
lru cache decoratorfunction memoizationfunctools backportleast recently used cachepython 3.3 functoolscache decorator importbackport compatibility
Topics
cachingcompatibility

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 › “python 3.3 functools”

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 functools32 · methodtools · pytest-antilru · async-lru · pylru · memoization · repoze-lru · cachetools · backports.cached-property · lru-dict