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.5.tar.gz (13.1 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.5-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.5.tar.gz
Algorithm Hash digest
SHA256 f2b6405fe7012ec0ebe606c08200ae44525e21a37507cc25afa4161ca74331dd
MD5 d01a871670004435611a529832d83b2a
BLAKE2b-256 66f9e4316dd720817797117ccc1201f33c9e890a81b61d387f6cc9d06ece3d76

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 01a465b6fff8472a5f92a9397077bfe39946e5867a62d659ee863dc8099ac7de
MD5 d0e8f8e9e2694022ad736cb0afa1fafb
BLAKE2b-256 7c7c4eb78cf4f4790fe58654d5ef337f8a52208d8a64a9aca952d420e5ed5047

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