<div align="center">
# HMR for Python
<sup> on-demand · fine-grained · push-pull reactivity </sup>
[](https://pypi.org/project/hmr/)
[](https://github.com/promplate/pyth-on-line/blob/main/packages/hmr/pyproject.toml)
[](https://pepy.tech/projects/hmr)
</div>
HMR means Hot Module Reload / [Hot Module Replacement](https://webpack.js.org/concepts/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](https://watchfiles.helpmanual.io/cli/)), HMR is just more efficient.
Unlike static-analysis tools like [Tach](https://github.com/gauge-sh/tach), HMR works by tracking the dependencies between names and modules **during runtime** through a [reactive system](https://wikipedia.org/wiki/Reactive_programming).
> The [docs site](https://pyth-on-line.promplate.dev/hmr) is available, but the documentation is still under construction. However, we have first-class [llms.txt](https://pyth-on-line.promplate.dev/hmr/llms.txt) and [MCP](https://pyth-on-line.promplate.dev/hmr/mcp) support for AI agents.
>
> [](https://pyth-on-line.promplate.dev/hmr/mcp)
## 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "hmr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "reactive-programming, hot-module-reload, signals, hmr",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/4c/a8/7253104b4b4a54e9f30a748db58d52b00debea3ef14916680307489a9989/hmr-0.7.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n# HMR for Python\n\n<sup> on-demand \u00b7 fine-grained \u00b7 push-pull reactivity </sup>\n\n[](https://pypi.org/project/hmr/)\n[](https://github.com/promplate/pyth-on-line/blob/main/packages/hmr/pyproject.toml)\n[](https://pepy.tech/projects/hmr)\n\n</div>\n\nHMR means Hot Module Reload / [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/). It is a feature that allows part of your app to be updated at runtime without a full rerun.\n\n- The module whose source file **you changed** will rerun\n- The module / function that **depends on** the changed module will rerun\n- Other modules that are unaffected (like third-party libraries) will not rerun\n\nThus, in contrast to the traditional way of **cold-reloading** Python applications (like [watchfiles CLI](https://watchfiles.helpmanual.io/cli/)), HMR is just more efficient.\n\nUnlike static-analysis tools like [Tach](https://github.com/gauge-sh/tach), HMR works by tracking the dependencies between names and modules **during runtime** through a [reactive system](https://wikipedia.org/wiki/Reactive_programming).\n\n> The [docs site](https://pyth-on-line.promplate.dev/hmr) is available, but the documentation is still under construction. However, we have first-class [llms.txt](https://pyth-on-line.promplate.dev/hmr/llms.txt) and [MCP](https://pyth-on-line.promplate.dev/hmr/mcp) support for AI agents.\n>\n> [](https://pyth-on-line.promplate.dev/hmr/mcp)\n\n## Usage\n\nIf you are running your entry file with `python foo.py bar baz ...`, you can just replace it with `hmr foo.py bar baz ...`.\n\nYou can also run modules with `hmr -m <module>`, just like `python -m <module>`.\n\nTry 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.\n",
"bugtrack_url": null,
"license": null,
"summary": "Hot Module Reload and Fine-grained Reactive Programming for Python",
"version": "0.7.0",
"project_urls": {
"Changelog": "https://github.com/promplate/pyth-on-line/commits/main/packages/hmr",
"Documentation": "https://pyth-on-line.promplate.dev/hmr/llms.txt",
"Homepage": "https://pyth-on-line.promplate.dev/hmr",
"Repository": "https://github.com/promplate/hmr"
},
"split_keywords": [
"reactive-programming",
" hot-module-reload",
" signals",
" hmr"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0f77e22d9befcf1dbe3d419c30344c45ef879d4309a260e7e8ed7b6d1a105d6a",
"md5": "42ca6900cd3b728038275beb4b57933e",
"sha256": "fd12e4a00641a00b635d73b6921c600fa4b6a8934562067c0724e215f7017d34"
},
"downloads": -1,
"filename": "hmr-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "42ca6900cd3b728038275beb4b57933e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 25510,
"upload_time": "2025-09-19T22:05:57",
"upload_time_iso_8601": "2025-09-19T22:05:57.608915Z",
"url": "https://files.pythonhosted.org/packages/0f/77/e22d9befcf1dbe3d419c30344c45ef879d4309a260e7e8ed7b6d1a105d6a/hmr-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4ca87253104b4b4a54e9f30a748db58d52b00debea3ef14916680307489a9989",
"md5": "0c84e0652fd021653c302f80db23d58a",
"sha256": "43dd6ac02cac4fa2276e2b5dd275473708bf4b92f90a7e064c47ee9ee6ef16c1"
},
"downloads": -1,
"filename": "hmr-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "0c84e0652fd021653c302f80db23d58a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 20036,
"upload_time": "2025-09-19T22:05:58",
"upload_time_iso_8601": "2025-09-19T22:05:58.537599Z",
"url": "https://files.pythonhosted.org/packages/4c/a8/7253104b4b4a54e9f30a748db58d52b00debea3ef14916680307489a9989/hmr-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-19 22:05:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "promplate",
"github_project": "pyth-on-line",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hmr"
}