Skip to main content

prewarm

Warm up Python environments by importing packages and triggering their one-time side effects — font caches, C extension loading, BLAS discovery, and more.

Usage

# Warm up via IPython (warms IPython's own init + packages)
prewarm matplotlib pandas numpy

# Or as a module
python -m prewarm matplotlib pandas numpy

# Skip IPython, just import directly
prewarm --no-ipython matplotlib pandas

API

from prewarm import warm

# Boot IPython, import modules, exit
warm(["matplotlib", "pandas"])

# Just import, no IPython
warm(["matplotlib", "pandas"], ipython=False)

Why?

First imports of heavy packages like matplotlib and pandas are slow — they build font caches, load C extensions, discover BLAS libraries, etc. Running prewarm in a fresh environment triggers all of these one-time costs up front so subsequent imports are fast.

When run with IPython (the default), it also warms IPython's startup path: traitlets configuration, magic commands, tab completion, and the display system. This is especially useful for Jupyter kernels where IPython boot time is part of the perceived startup latency.

Metadata

Release files for prewarm 0.0.1

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

Source distribution (sdist)

Source distribution for prewarm 0.0.1
File Size Uploaded
prewarm-0.0.1.tar.gz 2.9 kB Details

Built distribution (wheel)

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

Total release size: 5.9 kB

Release files / prewarm-0.0.1.tar.gz

Download URL prewarm-0.0.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3e1356dea48cfa9dd69ee82da00ce6ac07b156c6af3db8ea2f5a9cf1749a271b
BLAKE2b-256 checksum
How to use checksums
00eb0bdc8f502d6eb1d60ebe7f45711a814baca5362b6fef6bf08e0715b2d6f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / prewarm-0.0.1-py3-none-any.whl

Download URL prewarm-0.0.1-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aeeca194beb5ae33356b6d255da27249b3572c7bd80f728441c33b848c9b3dd
BLAKE2b-256 checksum
How to use checksums
0ed9f6b5dcaf048507beae6bf80f4c47ef914dcd30f221ab8ecd660b40626370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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