{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/8"}],"enrichment":{"capability":"Provides a @lazy decorator that defers computation of object attributes until first access, then caches the result for subsequent uses.","skillfed_tags":["decorator","lazy-evaluation","caching"],"use_cases":["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."],"what_it_does":"lazy is a single-decorator package that lets you mark methods as lazy attributes\u2014they 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.\n\nThe 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.","worth_installing":"Yes. The package is lightweight (no dependencies), actively maintained, permissively licensed, and solves a common pattern\u2014deferred initialization with caching\u2014cleanly and with full type support. Install it if you need lazy attribute evaluation in your codebase."},"id":"lazy","links":{"html":"https://skillfed.io/packages/lazy","md":"https://skillfed.io/packages/lazy.md","pypi":"https://pypi.org/project/lazy/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-04","license_spdx":null,"license_treatment":"permissive","name":"lazy","python_support":"supports_current","summary":"Lazy attributes for Python objects"},"popularity":{"monthly_downloads":517093,"position":6228,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0"}
