$npx skillfedfor your agent

lazy

Lazy attributes for Python objects

Worth itPyPI Software DevelopmentReleased Jul 2026517.1K downloads / moBSD-2-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — lazy-2.0-py3-none-any.whl
v2.0 · released 2026-07-04 · Python >=3.5

Yes. The package is lightweight (no dependencies), actively maintained, permissively licensed, and solves a common pattern—deferred initialization with caching—cleanly and with full type support. Install it if you need lazy attribute evaluation in your codebase.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.5
  • No runtime dependencies and low install friction.
  • Actively maintained with a recent release (2026-07-04) and ongoing repository activity.

License · maintenance · safety

BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

last release 2026-07-04 (41 days) · last repo commit 2026-08-07 · 53 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 517,093 downloads/mo, #6,228 on PyPI

Verify before relying

from lazy import lazy

class Example:
    @lazy
    def expensive_resource(self):
        return compute_something()

obj = Example()
result = obj.expensive_resource  # computed on first access
result2 = obj.expensive_resource  # cached result returned
Same gist for agents: .md · .json

What it is and what it does

lazy is a single-decorator package that lets you mark methods as lazy attributes—they compute their value only once, on first access, then cache and return that result on every subsequent access. This is useful for deferring expensive initialization until it's actually needed and avoiding redundant computation within an object's lifetime.

The decorator is fully typed, so type checkers can infer the type of a lazy attribute from the method's return annotation. Common use cases include lazy initialization of resource connections (file stores, database sessions) and caching of computed values (query results, derived data). The package has no runtime dependencies, making it lightweight to add to any project.

Use it for

  • Defer expensive resource initialization (file stores, database connections) until first use in a class.
  • Cache computed query results or derived data within an object to avoid repeated database or API calls.
  • Implement lazy property evaluation in view or request handler classes where data may not always be needed.
  • Build descriptor-based lazy loading patterns for large or slow-to-initialize object attributes.

Worth the install?

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

Worth it

Yes.

The package is lightweight (no dependencies), actively maintained, permissively licensed, and solves a common pattern—deferred initialization with caching—cleanly and with full type support. Install it if you need lazy attribute evaluation in your codebase.

Install

lazy on PyPI

Before you install

No runtime dependencies and low install friction. Actively maintained with a recent release (2026-07-04) and ongoing repository activity.

Requires Python >= 3.5

License in practice

BSD-2-Clause is permissive; you can use this package freely in commercial and private projects with minimal restrictions.

Quickstart

from lazy import lazy

class Example:
    @lazy
    def expensive_resource(self):
        return compute_something()

obj = Example()
result = obj.expensive_resource  # computed on first access
result2 = obj.expensive_resource  # cached result returned

Package facts

LicenseBSD-2-Clause permissive
Python supportSupports the current Python release >=3.5
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 41 days since the last release
Last repo commit
First released
Downloads517,093 / month, #6,228 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 :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Typing :: Typed

Evidence: lazy-2.0-py3-none-any.whl

Tags

Capabilities
lazy attribute decoratordeferred initialization pythoncomputed property cachinglazy evaluation decoratordescriptor lazy loadingon-demand attribute computation
Topics
decoratorlazy-evaluationcaching
PyPI keywords
decoratorlazylazy attributedescriptorproperty

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 › “lazy attribute decorator”

  • lazyProvides a @lazy decorator that defers computation of object…
  • zope.cachedescriptorsProvides decorator-based caching for computed properties and methods…
  • backports.cached-propertyProvides the cached_property decorator for Python 3.6 and 3.7,…

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.cached-property · lazy-model · Lazify · zope.cachedescriptors · vine · lazy-object-proxy · property-manager · lazy-loader · lazy-import · proxy_tools