lazyasd
Lazy & self-destructive tools for speeding up module imports
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2018, no commits since February 2022) and has high install friction. While the concept is sound and the BSD license is permissive, the lack of maintenance means no fixes for Python version incompatibilities or import machinery changes. For new projects, consider maintained alternatives or inline the single-file implementation directly into your codebase, as the documentation explicitly permits.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- High install friction reported.
- Package is abandoned as of 2022, with no releases since 2018 and no commits since February 2022.
- Maintenance risk is substantial for new projects.
License · maintenance · safety
BSD 3-clause (permissive) — BSD 3-clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
last release 2018-03-21 (3068 days) · last repo commit 2022-02-04 · 55 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 145,284 downloads/mo, #11,129 on PyPI
Alternatives
Verify before relying
from lazyasd import LazyObject
import re
FOO_RE = LazyObject(lambda: re.compile('foo'), globals(), 'FOO_RE')
def has_foo(s):
return FOO_RE.search(s) is not None- Compatibility with Python versions released after 2018 (last release date) is unclear.
- Whether the package works correctly with modern import machinery and sys.modules behavior.
- Active maintenance or community forks that may have addressed issues since abandonment.
What it is and what it does
lazyasd provides tools to defer expensive computations and module imports until they are actually needed, reducing application startup time. It works by wrapping expensive operations in lazy proxy objects that perform no work when created, but trigger their loader function on first access and then replace themselves in the calling scope with the real value. This is useful for command-line tools, web servers, and other user-facing applications where import speed matters.
The package offers three main strategies: LazyObject for general lazy construction, LazyBool and LazyDict for specialized cases, and load_module_in_background() for importing heavy modules on a background thread. The self-destructive aspect means that once a lazy object is accessed and replaced with its real value, the proxy itself can be garbage collected, leaving no overhead in subsequent accesses.
Use it for
- Speed up CLI startup by deferring regex compilation, config parsing, or other expensive module-level setup until first use.
- Lazy-import heavy third-party modules like pygments or pkg_resources in background threads to unblock application initialization.
- Reduce import time for data science or ML libraries that build large global caches or models at import time.
- Implement lazy module imports where a submodule is only imported if one of its members is actually accessed.
- Defer expensive initialization in long-running services that may not use all their optional features on every run.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2018, no commits since February 2022) and has high install friction. While the concept is sound and the BSD license is permissive, the lack of maintenance means no fixes for Python version incompatibilities or import machinery changes. For new projects, consider maintained alternatives or inline the single-file implementation directly into your codebase, as the documentation explicitly permits.
Install
lazyasd on PyPI
Before you install
High install friction reported. Package is abandoned as of 2022, with no releases since 2018 and no commits since February 2022. Maintenance risk is substantial for new projects.
License in practice
BSD 3-clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
from lazyasd import LazyObject
import re
FOO_RE = LazyObject(lambda: re.compile('foo'), globals(), 'FOO_RE')
def has_foo(s):
return FOO_RE.search(s) is not None
Verify before relying
- Compatibility with Python versions released after 2018 (last release date) is unclear.
- Whether the package works correctly with modern import machinery and sys.modules behavior.
- Active maintenance or community forks that may have addressed issues since abandonment.
Package facts
| License | BSD 3-clause permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,068 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 145,284 / month, #11,129 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI ApprovedProgramming Language :: PythonTopic :: Utilities |
Evidence: lazyasd-0.1.4.tar.gz
Tags
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 module imports”
- lazyasdProvides lazy-loading and self-destructive proxy objects to defer…
- lazy-importsDefers loading of module attributes and their dependencies until…
- lazy-importDefers module loading and ImportErrors until a module or callable is…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also lazy-imports · lazy-import · lazy-object-proxy · lazy-loader · Lazify · lazy-model · lazy · mo-imports · fastsafetensors · proxy_tools