--- id: lazy-loader version: "0.5" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # lazy-loader — Makes it easy to load subpackages and functions on demand. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install lazy-loader uv add lazy-loader poetry add lazy-loader ## Description [![PyPI](https://img.shields.io/pypi/v/lazy-loader)](https://pypi.org/project/lazy-loader/) [![Test status](https://github.com/scientific-python/lazy-loader/workflows/test/badge.svg?branch=main)](https://github.com/scientific-python/lazy-loader/actions?query=workflow%3A%22test%22) [![Test coverage](https://codecov.io/gh/scientific-python/lazy-loader/branch/main/graph/badge.svg)](https://app.codecov.io/gh/scientific-python/lazy-loader/branch/main) `lazy-loader` makes it easy to load subpackages and functions on demand. ## Motivation 1. Allow subpackages to be made visible to users without incurring import costs. 2. Allow external libraries to be imported only when used, improving import times. For a more detailed discussion, see [the SPEC](https://scientific-python.org/specs/spec-0001/). ## Installation ``` pip install -U lazy-loader ``` We recommend using `lazy-loader` with Python >= 3.11. If using Python 3.11, please upgrade to 3.11.9 or later. If using Python 3.12, please upgrade to 3.12.3 or later. These versions [avoid](https://github.com/python/cpython/pull/114781) a [known race condition](https://github.com/python/cpython/issues/114763). ## Usage ### Lazily load... [View on SkillFed](https://skillfed.io/packages/lazy-loader) · [View on PyPI](https://pypi.org/project/lazy-loader/)