Skip to main content

Hot Module Reload for Python

Project description

HMR for Python

on-demand · fine-grained · pull-push 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.1.tar.gz (9.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.5.2.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hmr-0.5.2.1.tar.gz
Algorithm Hash digest
SHA256 e2234e282aed2ad5082f48b01200e4621705afa8d195685c250d32c3ae38b8ca
MD5 ca7f8ddeac1e1c0caeb5d5bbbf2105db
BLAKE2b-256 0648feb1cafe2eb1e0f8be5ac12b3a36d5625c57d62f6a598abb123abd13acb2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hmr-0.5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e75baff11739ee3418759b108c031e2bfcfb3cf017a991130f1df38ec5441c79
MD5 1d3d02856ac8ecb0f63dbe95be270f29
BLAKE2b-256 5119a7a84f6a24d80e76426af693b87debdfb04597a6eae43009660875e0ca3c

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