Skip to main content

Hot Module Reload and Fine-grained Reactive Programming 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.

The docs site is available, but the documentation is still under construction. However, we have first-class llms.txt and MCP support for AI agents.

MCP Server

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 run modules with hmr -m <module>, just like python -m <module>.

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmr-0.7.4.1-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hmr-0.7.4.1-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for hmr-0.7.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7de7283f3edaccedd6767e27006024dea813d679ce5b30a40379e8793c209ec1
MD5 84dd2f479159aa5a44e9149e575b80cf
BLAKE2b-256 591b589c96ae60a387bb7995b5cf145f2d06dff11d9f9e0e7621ca929e8a3478

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