Adopting Python 3.15's lazy imports: a 4× faster CLI, and where they didn't help

November 8, 2026 Dev blog#python#performance#developer-tools

On November 3 we moved our back office to Python 3.15.2. It is one Python package with three front ends: a command-line tool, a terminal UI built on Textual, and an MCP server that gives AI agents the same operations. Together they fetch our domain inventory from registrars, price it, and build this website.

All three started slowly. --help on the CLI took about 1.3 seconds on a busy development Mac, because the CLI's main module imported nearly everything at module scope: the site generator, the registrar clients and the database layer. Python 3.15 added explicit lazy imports (PEP 810), so we used them. We also adopted the new built-in frozendict (PEP 814) and documented the new sampling profiler (PEP 799).