Skip to main content

Hot Module Reload for Python

Project description

HMR for Python

on-demand · fine-grained · push-pull reactivity

PyPI - Version Supported Python Version PyPI - Downloads

HMR means Hot Module Reload / Hot Module Replacement. It is a feature that allows part of your app to be updated at runtime without a full rerun.

  • The module whose source file you changed will rerun
  • The module / function that depend on the changed module will rerun
  • Other modules that are unaffected (like third-party libraries) will not rerun

Thus, in contrast to the traditional way of cold-reloading Python applications (like watchfiles CLI), HMR is just more efficient.

Unlike static-analysis tools like Tach, HMR works by tracking the dependencies between names and modules during runtime through a reactive system.

Usage

If you are running your entry file with python foo.py bar baz ..., you can just replace it with hmr foo.py bar baz ....

You can also try it with uvx or pipx. If you are using a virtual environment, it is recommended to install hmr in the virtual environment instead of globally.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmr-0.5.2.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmr-0.5.2.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file hmr-0.5.2.3.tar.gz.

File metadata

  • Download URL: hmr-0.5.2.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.5

File hashes

Hashes for hmr-0.5.2.3.tar.gz
Algorithm Hash digest
SHA256 b7390fb4cad83b8872cab4a92f2a92c23033f3dfe766cc3bc8d4fa20cf1ae304
MD5 f847dd93cf42314a1e8933a8eb4d7b6b
BLAKE2b-256 7825188d2d9c96c6fbecd6f76d3f78a0468aa8d30841de4ea020ad3c2a6b94b8

See more details on using hashes here.

File details

Details for the file hmr-0.5.2.3-py3-none-any.whl.

File metadata

  • Download URL: hmr-0.5.2.3-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.5

File hashes

Hashes for hmr-0.5.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c07ca07dd05600f2491a970bf4d7f1dafd29ed82adad0d3b41666c7baeb66f3
MD5 5ccd6341a3a3682cf25f301558166ae8
BLAKE2b-256 ff89f05be6be1b639a7832a19bf8049b094f202bc3ad6bed6d8043cd6d198672

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page