# Faster Python startup with lazy imports

DevFeed: [Faster Python startup with lazy imports](<https://devfeed.tech/articles/faster-python-startup-with-lazy-imports-83944.md>)

Original publisher: [Read original article](<https://lemire.me/blog/2026/10/09/faster-python-startup-with-lazy-imports/>)

Author: Daniel Lemire

Published: 2026-10-09T03:15:06Z

Content type: article

Language: en

Sources: [Daniel Lemire](<https://devfeed.tech/sources/daniel-lemire.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>)

Tags: [dependencies](<https://devfeed.tech/tags/dependencies.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [lazy-import](<https://devfeed.tech/tags/lazy-import.md>), [python](<https://devfeed.tech/tags/python.md>), [python-3-15](<https://devfeed.tech/tags/python-3-15.md>)

## AI overview

Python's upcoming lazy imports defer loading dependencies until code uses them. In a command-line tool benchmark, lazy imports reduced version-command startup from 295 ms to 20 ms and made the mean command twelve times faster. The tradeoff is that missing-module errors may appear later, at first use.

## Source excerpt

When a Python program starts, it needs to load all its dependencies (import). With the upcoming version of Python, it is possible to use lazy imports instead. lazy import json lazy from decimal import Decimal In this instance, the name json is no longer the module, but a mere placeholder object. The actual import only ... Continue reading Faster Python startup with lazy imports