lazy-object-proxy
A fast and thorough lazy object proxy.
Decision gist · record as of 2026-08-14
Yes. This is a stable, actively maintained utility with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you have expensive object creation you want to defer—it's a straightforward, proven solution for lazy initialization patterns.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Low friction installation with no runtime dependencies.
- Actively maintained as of 2026-02-22 with production-stable status.
License · maintenance · safety
BSD-2-Clause (permissive) — BSD-2-Clause is permissive; you can use this freely in commercial and private projects with minimal restrictions.
last release 2025-08-22 (357 days) · last repo commit 2026-02-22 · 262 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 43,925,043 downloads/mo, #638 on PyPI
Alternatives
Verify before relying
import lazy_object_proxy
def expensive_func():
return 10
obj = lazy_object_proxy.Proxy(expensive_func)
print(obj) # expensive_func called on first access- Performance characteristics compared to direct instantiation or other lazy-loading approaches in real workloads.
- Thread-safety guarantees when the proxy is accessed from multiple threads concurrently.
What it is and what it does
lazy-object-proxy wraps a callable in a proxy object that delays execution until the wrapped object is actually used. The first time you access any attribute or method on the proxy, it calls the wrapped function, caches the result, and forwards all subsequent operations to that cached object. This is useful when object creation is expensive (database queries, file I/O, complex computations) but you don't know if it will be needed immediately.
The package differs from wrapt.ObjectProxy in that wrapt forwards method calls to a pre-existing target object, whereas lazy-object-proxy calls a function to create the target on first use. It supports current Python versions (3.9 through 3.14) and has no runtime dependencies, making it lightweight and straightforward to integrate.
Use it for
- Defer expensive database connections or queries until a request actually needs them in a web application.
- Lazy-load large data structures or files only when code paths that use them are executed.
- Wrap slow initialization logic in frameworks or libraries to improve startup time.
- Create circular dependency workarounds by deferring object creation until both sides are ready.
- Implement optional feature loading where heavy modules are only imported and initialized if used.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a stable, actively maintained utility with zero dependencies, permissive licensing, and no known vulnerabilities. Install it if you have expensive object creation you want to defer—it's a straightforward, proven solution for lazy initialization patterns.
Install
lazy-object-proxy on PyPI
Before you install
Low friction installation with no runtime dependencies. Actively maintained as of 2026-02-22 with production-stable status.
Requires Python 3.9 or later.
License in practice
BSD-2-Clause is permissive; you can use this freely in commercial and private projects with minimal restrictions.
Quickstart
import lazy_object_proxy
def expensive_func():
return 10
obj = lazy_object_proxy.Proxy(expensive_func)
print(obj) # expensive_func called on first access
Verify before relying
- Performance characteristics compared to direct instantiation or other lazy-loading approaches in real workloads.
- Thread-safety guarantees when the proxy is accessed from multiple threads concurrently.
Package facts
| License | BSD-2-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 357 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 43,925,043 / month, #638 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Utilities |
Evidence: lazy_object_proxy-1.12.0-pp39.pp310.pp311.graalpy311-none-any.whl
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 initialization proxy”
- lazy-object-proxyProvides a proxy object that defers execution of an expensive…
- lazyasdProvides lazy-loading and self-destructive proxy objects to defer…
- proxy_toolsProvides a lazy-evaluation proxy object that defers function calls…
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 Lazify · proxy_tools · lazyasd · lazy · lazy-model · async-property · lazy-imports · lazy-import · iterproxy · vine