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.6.1.2.tar.gz (10.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.1.2-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.1.2.tar.gz
Algorithm Hash digest
SHA256 797554ca86de3e8bd1146798b4154050c754a1e966b4cb43e8ff7d56ebf43475
MD5 11b838d05d0209cbc6313bb67b714748
BLAKE2b-256 2bfc8f8f1c6ba862d878601eee6642a47f39b7e924163933653d9f8792a01cbe

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for hmr-0.6.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b16544289dd450a91b418139c805b2211c4246ac2a1a1d019475e117aef7e3a
MD5 136357e0c6ee1d558acddf4946e60a33
BLAKE2b-256 24dfa1db704e0b3236d4181dd911c082f00bcd0a2769b68c889fa168bdb99de8

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