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 depends 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.6.4.5.tar.gz (12.3 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.6.4.5-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.4.5.tar.gz
Algorithm Hash digest
SHA256 3a3134531571bee6be578e21076c5fb04e08e14e5d9284a33f30962b681a2ecf
MD5 a3f63cb7be0e9de8cb07b4632a78485f
BLAKE2b-256 fb8c8b4a4ec5f3e6832b53a0cc11807e7488ba187ae6900d5bb8b53ec153fe4a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf5a057a2dc54808431a4ffe16574856bece11181ac0191c7df9ba68ced31d2f
MD5 c74a129456a20d008653c4889f98fc50
BLAKE2b-256 ffe8cc0807a92fe661153f6a170e2f8fa9ab3727b9e32ef572fe5675309ca956

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