Skip to main content

Lazi: Lazy Imports Everywhere

A lightweight and extensible way to implement lazy imports globally.

Usage:

poetry add lazi
"""example.py

Automatic lazy loading example.
Install django to run, or change the imports.
"""
import lazi.auto                 # Install import tracking.
import django.test               # Import stuff.
print(len(lazi.auto.RECORD))     # Peek at the internals for demonstration.
TestCase = django.test.TestCase  # Trigger lazy loading.
print(len(lazi.auto.RECORD))     # More modules were lazy loaded.
python example.py
6
198

Metadata

Reference for developers: The json dict below contains Python versioning parameters:

  • Soft min (ignore rev) & hard max compatible versions.
  • Recommended use & creator's environment dev versions.
{
  "python": {
    "version": {
      "min": "3.10.11",
      "max": "3.12",
      "use": "3.11",
      "dev": "3.11.2"
    }
  }
}

Release files for lazi 1.1.0.post13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lazi 1.1.0.post13
File Size Uploaded
lazi-1.1.0.post13.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lazi 1.1.0.post13
File Interpreter ABI Platform
lazi-1.1.0.post13-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / lazi-1.1.0.post13.tar.gz

Download URL lazi-1.1.0.post13.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3f18f0a6fb24f04088c99f7034854aa3d35eb9f6b6298184c720dd99862c154a
BLAKE2b-256 checksum
How to use checksums
de49ffed4c5abb2008a7dce74a2c07a2b103a27cd1072c20b6ce9aec2defbcf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.2 Linux/6.2.0-20-generic

Release files / lazi-1.1.0.post13-py3-none-any.whl

Download URL lazi-1.1.0.post13-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6aa9e39836c77b5f4837bb938c797a669e4b7380079c705c19a54ec790105509
BLAKE2b-256 checksum
How to use checksums
84fcbf14113b4f2ddde31835284d380a4e04db933ffe4e79858d6d995bf60961
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.11.2 Linux/6.2.0-20-generic
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page