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.6.tar.gz (13.7 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.6-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.6.tar.gz
Algorithm Hash digest
SHA256 de8e873b747ba5d60b6d491dad5109cc08123667dd4556bdef069bab675ae9ad
MD5 27d3b335e57de311fee4c4597b7ff94c
BLAKE2b-256 39c0b287a04ae041c905efddf0d362c193e43aaae695b4cce004350f85f03db9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4341fe327113295b457a2cc418277491ae958d72d80d7c93f7dcf2b7c2c7ac45
MD5 0c90b7b1bb037a47c0b2c3b416c60eb8
BLAKE2b-256 27cfb5cef4f70ea9b8d2ac4bd26de9a5dda865440c7ff3de30263d5751e16a3c

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