hmr 0.5.2__py3-none-any.whl → 0.5.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: hmr
|
3
|
+
Version: 0.5.2.1
|
4
|
+
Summary: Hot Module Reload for Python
|
5
|
+
Project-URL: repository, https://github.com/promplate/pyth-on-line/tree/reactivity
|
6
|
+
Requires-Python: >=3.12
|
7
|
+
Requires-Dist: watchfiles<2,>=0.21; sys_platform != "emscripten"
|
8
|
+
Description-Content-Type: text/markdown
|
9
|
+
|
10
|
+
<div align="center">
|
11
|
+
|
12
|
+
# HMR for Python
|
13
|
+
|
14
|
+
<sup> on-demand · fine-grained · pull-push reactivity </sup>
|
15
|
+
|
16
|
+
[](https://pypi.org/project/hmr/)
|
17
|
+
[](https://github.com/promplate/pyth-on-line/blob/reactivity/packages/hmr/pyproject.toml)
|
18
|
+
[](https://pepy.tech/projects/hmr)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
22
|
+
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.
|
23
|
+
|
24
|
+
- The module whose source file **you changed** will rerun
|
25
|
+
- The module / function that **depend on** the changed module will rerun
|
26
|
+
- Other modules that are unaffected (like third-party libraries) will not rerun
|
27
|
+
|
28
|
+
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.
|
29
|
+
|
30
|
+
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).
|
31
|
+
|
32
|
+
## Usage
|
33
|
+
|
34
|
+
If you are running your entry file with `python foo.py bar baz ...`, you can just replace it with `hmr foo.py bar baz ...`.
|
35
|
+
|
36
|
+
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.
|
@@ -1,14 +1,14 @@
|
|
1
|
-
hmr-0.5.2.dist-info/METADATA,sha256=
|
2
|
-
hmr-0.5.2.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
-
hmr-0.5.2.dist-info/entry_points.txt,sha256=g_T0uJ43WgsdG14kkkdaBQuIL0HO-m1qvtjXMP6d060,59
|
1
|
+
hmr-0.5.2.1.dist-info/METADATA,sha256=A-0hVQkuyKNRaNS-opfmUwmULQY6_SZHYxIHn2RMVQE,2001
|
2
|
+
hmr-0.5.2.1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
hmr-0.5.2.1.dist-info/entry_points.txt,sha256=g_T0uJ43WgsdG14kkkdaBQuIL0HO-m1qvtjXMP6d060,59
|
4
4
|
reactivity/__init__.py,sha256=pX-RUzkezCC1x4eOWGxNhXbwrbvBLP_3pQuZr9eZz1Y,300
|
5
5
|
reactivity/functional.py,sha256=jJLEq88w5ag2cXuD1T118uEjnEg37_mqvWmFkb47KVY,1300
|
6
6
|
reactivity/helpers.py,sha256=rcrCXy1mmlei-if_BN4nSgS2IG9kBj-jq1YRwEfcITo,5329
|
7
7
|
reactivity/hmr/__init__.py,sha256=S5ZIHqCRpevdzWuhS0aCua_S8F0LkK0YNg6IgeTScFQ,177
|
8
8
|
reactivity/hmr/__main__.py,sha256=uIcyjR5gMFIXH_3hS0B3SD00RirVf7GIct-uItx675o,64
|
9
9
|
reactivity/hmr/api.py,sha256=sKDQV7uKRVoDifTZKrLQGZP-fzgYbdVjfEOC6ki4NKY,2280
|
10
|
-
reactivity/hmr/core.py,sha256=
|
10
|
+
reactivity/hmr/core.py,sha256=LpIZubK8XZLAxVM3ZWcxPT14WjcbZVHiU57AMN_KF8Y,11688
|
11
11
|
reactivity/hmr/hooks.py,sha256=jIFpe4CNxfaS9RcR4OIodx_sOZlnJ_IA1T1RtHPXhwU,945
|
12
12
|
reactivity/hmr/utils.py,sha256=h9m7iRXlvsLTrHoXV9gEVbhz3XsPK4KgnStYoCAWE5I,1616
|
13
13
|
reactivity/primitives.py,sha256=QkiUF8bqLZtyXguWwNJi34HJIc-SzUKqi1M9UgTNuvI,5952
|
14
|
-
hmr-0.5.2.dist-info/RECORD,,
|
14
|
+
hmr-0.5.2.1.dist-info/RECORD,,
|
reactivity/hmr/core.py
CHANGED
hmr-0.5.2.dist-info/METADATA
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: hmr
|
3
|
-
Version: 0.5.2
|
4
|
-
Summary: Hot Module Reload for Python
|
5
|
-
Project-URL: repository, https://github.com/promplate/pyth-on-line/tree/reactivity
|
6
|
-
Requires-Python: >=3.12
|
7
|
-
Requires-Dist: watchfiles<2,>=0.21; sys_platform != "emscripten"
|
8
|
-
|
File without changes
|
File without changes
|